From 0b44d82a461378a86797a097ab600d90f78657f6 Mon Sep 17 00:00:00 2001 From: Shashank Date: Mon, 27 Apr 2026 15:38:23 +0530 Subject: [PATCH 01/14] fix unknown fields --- docs/openrpc-specs/v0.json | 63 +++++++++++++++++- docs/openrpc-specs/v1.json | 63 +++++++++++++++++- scripts/tests/api_compare/docker-compose.yml | 3 + src/rpc/methods/common.rs | 3 + src/rpc/methods/eth.rs | 2 + src/rpc/methods/state.rs | 5 +- src/rpc/methods/state/types.rs | 65 ++++++++++++++++++- .../forest__rpc__tests__rpc__v0.snap | 43 ++++++++++++ .../forest__rpc__tests__rpc__v1.snap | 43 ++++++++++++ src/state_manager/utils.rs | 2 + 10 files changed, 285 insertions(+), 7 deletions(-) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index f49979ad9700..47a1607a10a8 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -9556,6 +9556,18 @@ } ] }, + "IpldOps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceIpld" + } + }, + "Logs": { + "type": "array", + "items": { + "type": "string" + } + }, "Msg": { "$ref": "#/components/schemas/MessageTrace" }, @@ -10193,6 +10205,10 @@ "UpgradeWatermelonHeight": { "type": "integer", "format": "int64" + }, + "UpgradeXxHeight": { + "type": "integer", + "format": "int64" } }, "required": [ @@ -10227,7 +10243,8 @@ "UpgradeTuktukHeight", "UpgradeTeepHeight", "UpgradeTockHeight", - "UpgradeGoldenWeekHeight" + "UpgradeGoldenWeekHeight", + "UpgradeXxHeight" ] }, "GasTrace": { @@ -10868,6 +10885,11 @@ "ForkUpgradeParams": { "$ref": "#/components/schemas/ForkUpgradeParams" }, + "GenesisTimestamp": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, "NetworkName": { "type": "string" }, @@ -10882,7 +10904,8 @@ "ConsensusMinerMinPower", "PreCommitChallengeDelay", "ForkUpgradeParams", - "Eip155ChainID" + "Eip155ChainID", + "GenesisTimestamp" ] }, "NetworkVersion": { @@ -11418,6 +11441,12 @@ "APIVersion": { "$ref": "#/components/schemas/ShiftingVersion" }, + "Agent": { + "type": [ + "string", + "null" + ] + }, "BlockDelay": { "type": "integer", "format": "uint32", @@ -11917,6 +11946,36 @@ } ] }, + "TraceIpld": { + "description": "IPLD operation details attached to an [`ExecutionTrace`].", + "type": "object", + "properties": { + "Cid": { + "$ref": "#/components/schemas/Cid" + }, + "Op": { + "$ref": "#/components/schemas/TraceIpldOp" + }, + "Size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "Op", + "Cid", + "Size" + ] + }, + "TraceIpldOp": { + "type": "string", + "enum": [ + "Get", + "Put", + "Unknown" + ] + }, "TraceResult": { "anyOf": [ { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index ed232848eaea..dd6bb50f7e03 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -9770,6 +9770,18 @@ } ] }, + "IpldOps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceIpld" + } + }, + "Logs": { + "type": "array", + "items": { + "type": "string" + } + }, "Msg": { "$ref": "#/components/schemas/MessageTrace" }, @@ -10407,6 +10419,10 @@ "UpgradeWatermelonHeight": { "type": "integer", "format": "int64" + }, + "UpgradeXxHeight": { + "type": "integer", + "format": "int64" } }, "required": [ @@ -10441,7 +10457,8 @@ "UpgradeTuktukHeight", "UpgradeTeepHeight", "UpgradeTockHeight", - "UpgradeGoldenWeekHeight" + "UpgradeGoldenWeekHeight", + "UpgradeXxHeight" ] }, "GasTrace": { @@ -11249,6 +11266,11 @@ "ForkUpgradeParams": { "$ref": "#/components/schemas/ForkUpgradeParams" }, + "GenesisTimestamp": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, "NetworkName": { "type": "string" }, @@ -11263,7 +11285,8 @@ "ConsensusMinerMinPower", "PreCommitChallengeDelay", "ForkUpgradeParams", - "Eip155ChainID" + "Eip155ChainID", + "GenesisTimestamp" ] }, "NetworkVersion": { @@ -11830,6 +11853,12 @@ "APIVersion": { "$ref": "#/components/schemas/ShiftingVersion" }, + "Agent": { + "type": [ + "string", + "null" + ] + }, "BlockDelay": { "type": "integer", "format": "uint32", @@ -12329,6 +12358,36 @@ } ] }, + "TraceIpld": { + "description": "IPLD operation details attached to an [`ExecutionTrace`].", + "type": "object", + "properties": { + "Cid": { + "$ref": "#/components/schemas/Cid" + }, + "Op": { + "$ref": "#/components/schemas/TraceIpldOp" + }, + "Size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "Op", + "Cid", + "Size" + ] + }, + "TraceIpldOp": { + "type": "string", + "enum": [ + "Get", + "Put", + "Unknown" + ] + }, "TraceResult": { "anyOf": [ { diff --git a/scripts/tests/api_compare/docker-compose.yml b/scripts/tests/api_compare/docker-compose.yml index 0d4dc88029c1..38a8df93106c 100644 --- a/scripts/tests/api_compare/docker-compose.yml +++ b/scripts/tests/api_compare/docker-compose.yml @@ -266,6 +266,7 @@ services: - RUST_LOG=info,forest::tool::subcommands=debug - FOREST_RPC_DEFAULT_TIMEOUT=120 - FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE} + - FOREST_STRICT_JSON=1 entrypoint: ["/bin/bash", "-c"] user: 0:0 command: @@ -310,6 +311,7 @@ services: - RUST_LOG=info,forest::tool::subcommands=debug - FOREST_RPC_DEFAULT_TIMEOUT=120 - FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE} + - FOREST_STRICT_JSON=1 entrypoint: ["/bin/bash", "-c"] user: 0:0 command: @@ -379,6 +381,7 @@ services: - RUST_LOG=info,forest::tool::subcommands=debug - FOREST_RPC_DEFAULT_TIMEOUT=120 - FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE} + - FOREST_STRICT_JSON=1 entrypoint: ["/bin/bash", "-c"] user: 0:0 command: diff --git a/src/rpc/methods/common.rs b/src/rpc/methods/common.rs index 75653a7fca99..0a78661d4bf4 100644 --- a/src/rpc/methods/common.rs +++ b/src/rpc/methods/common.rs @@ -55,6 +55,7 @@ impl RpcMethod<0> for Version { // For the API v0, we don't support it but it should be `1.5.0`. api_version: ShiftingVersion::new(2, 3, 0), block_delay: ctx.chain_config().block_delay_secs, + agent: None, }) } } @@ -106,6 +107,8 @@ pub struct PublicVersion { #[serde(rename = "APIVersion")] pub api_version: ShiftingVersion, pub block_delay: u32, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub agent: Option, } lotus_json_with_self!(PublicVersion); diff --git a/src/rpc/methods/eth.rs b/src/rpc/methods/eth.rs index b895184646da..f12d8ffa2ea2 100644 --- a/src/rpc/methods/eth.rs +++ b/src/rpc/methods/eth.rs @@ -4502,6 +4502,8 @@ mod test { invoked_actor: None, gas_charges: vec![], subcalls: vec![], + logs: vec![], + ipld_ops: vec![], } } diff --git a/src/rpc/methods/state.rs b/src/rpc/methods/state.rs index 55feef3a7862..09149fe0553d 100644 --- a/src/rpc/methods/state.rs +++ b/src/rpc/methods/state.rs @@ -3172,6 +3172,7 @@ impl RpcMethod<0> for StateGetNetworkParams { fork_upgrade_params: ForkUpgradeParams::try_from(config) .context("Failed to get fork upgrade params")?, eip155_chain_id: config.eth_chain_id, + genesis_timestamp: ctx.chain_store().genesis_block_header().timestamp, }; Ok(params) @@ -3190,6 +3191,7 @@ pub struct NetworkParams { fork_upgrade_params: ForkUpgradeParams, #[serde(rename = "Eip155ChainID")] eip155_chain_id: EthChainId, + genesis_timestamp: u64, } lotus_json_with_self!(NetworkParams); @@ -3229,7 +3231,7 @@ pub struct ForkUpgradeParams { upgrade_teep_height: ChainEpoch, upgrade_tock_height: ChainEpoch, upgrade_golden_week_height: ChainEpoch, - //upgrade_xxx_height: ChainEpoch, + upgrade_xx_height: ChainEpoch, } impl TryFrom<&ChainConfig> for ForkUpgradeParams { @@ -3279,6 +3281,7 @@ impl TryFrom<&ChainConfig> for ForkUpgradeParams { upgrade_tock_height: get_height(Tock)?, upgrade_golden_week_height: get_height(GoldenWeek)?, //upgrade_firehorse_height: get_height(FireHorse)?, + upgrade_xx_height: 999_999_999_999_999, }) } } diff --git a/src/rpc/methods/state/types.rs b/src/rpc/methods/state/types.rs index 4edd6a6e3575..e41bacf1f3e7 100644 --- a/src/rpc/methods/state/types.rs +++ b/src/rpc/methods/state/types.rs @@ -17,8 +17,9 @@ use crate::shim::{ use cid::Cid; use fvm_ipld_encoding::RawBytes; use num::Zero as _; -use schemars::JsonSchema; +use schemars::{JsonSchema, Schema, SchemaGenerator}; use serde::{Deserialize, Serialize}; +use serde_with::{DeserializeFromStr, SerializeDisplay}; #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, PartialEq)] #[serde(rename_all = "PascalCase")] @@ -139,7 +140,52 @@ impl MessageGasCost { } } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] +/// IPLD operation kind for [`TraceIpld`]. +#[derive( + Debug, + Clone, + PartialEq, + Eq, + SerializeDisplay, + DeserializeFromStr, + strum::Display, + strum::EnumString, +)] +#[strum(serialize_all = "PascalCase")] +pub enum TraceIpldOp { + Get, + Put, + #[strum(to_string = "Unknown", default)] + Unknown(String), +} + +impl JsonSchema for TraceIpldOp { + fn schema_name() -> std::borrow::Cow<'static, str> { + "TraceIpldOp".into() + } + + fn json_schema(_: &mut SchemaGenerator) -> Schema { + schemars::json_schema!({ + "type": "string", + "enum": ["Get", "Put", "Unknown"], + }) + } +} + +/// IPLD operation details attached to an [`ExecutionTrace`]. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] +#[serde(rename_all = "PascalCase")] +pub struct TraceIpld { + pub op: TraceIpldOp, + #[serde(with = "crate::lotus_json")] + #[schemars(with = "LotusJson")] + pub cid: Cid, + pub size: u64, +} + +lotus_json_with_self!(TraceIpld); + +#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "PascalCase")] pub struct ExecutionTrace { pub msg: MessageTrace, @@ -149,6 +195,21 @@ pub struct ExecutionTrace { #[serde(with = "crate::lotus_json")] #[schemars(with = "LotusJson>")] pub subcalls: Vec, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub logs: Vec, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub ipld_ops: Vec, +} + +impl PartialEq for ExecutionTrace { + /// Ignore [`Self::logs`] and [`Self::ipld_ops`] as they are implementation-dependent + fn eq(&self, other: &Self) -> bool { + self.msg == other.msg + && self.msg_rct == other.msg_rct + && self.invoked_actor == other.invoked_actor + && self.gas_charges == other.gas_charges + && self.subcalls == other.subcalls + } } impl ExecutionTrace { diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index d3436b32a6ff..7ff2912c1eaf 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -5977,6 +5977,14 @@ components: anyOf: - $ref: "#/components/schemas/ActorTrace" - type: "null" + IpldOps: + type: array + items: + $ref: "#/components/schemas/TraceIpld" + Logs: + type: array + items: + type: string Msg: $ref: "#/components/schemas/MessageTrace" MsgRct: @@ -6449,6 +6457,9 @@ components: UpgradeWatermelonHeight: type: integer format: int64 + UpgradeXxHeight: + type: integer + format: int64 required: - UpgradeSmokeHeight - UpgradeBreezeHeight @@ -6482,6 +6493,7 @@ components: - UpgradeTeepHeight - UpgradeTockHeight - UpgradeGoldenWeekHeight + - UpgradeXxHeight GasTrace: type: object properties: @@ -6952,6 +6964,10 @@ components: minimum: 0 ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" + GenesisTimestamp: + type: integer + format: uint64 + minimum: 0 NetworkName: type: string PreCommitChallengeDelay: @@ -6964,6 +6980,7 @@ components: - PreCommitChallengeDelay - ForkUpgradeParams - Eip155ChainID + - GenesisTimestamp NetworkVersion: description: "Specifies the network version\n\n# Examples\n```\n# use forest::doctest_private::NetworkVersion;\nlet v0 = NetworkVersion::V0;\n\n// dereference to convert to FVM4\nassert_eq!(fvm_shared4::version::NetworkVersion::V0, *v0);\n\n// use `.into()` when FVM3 has to be specified.\nassert_eq!(fvm_shared3::version::NetworkVersion::V0, v0.into());\n\n// use `.into()` when FVM2 has to be specified.\nassert_eq!(fvm_shared2::version::NetworkVersion::V0, v0.into());\n```" type: integer @@ -7308,6 +7325,10 @@ components: properties: APIVersion: $ref: "#/components/schemas/ShiftingVersion" + Agent: + type: + - string + - "null" BlockDelay: type: integer format: uint32 @@ -7665,6 +7686,28 @@ components: anyOf: - $ref: "#/components/schemas/EthCallTraceAction" - $ref: "#/components/schemas/EthCreateTraceAction" + TraceIpld: + description: "IPLD operation details attached to an [`ExecutionTrace`]." + type: object + properties: + Cid: + $ref: "#/components/schemas/Cid" + Op: + $ref: "#/components/schemas/TraceIpldOp" + Size: + type: integer + format: uint64 + minimum: 0 + required: + - Op + - Cid + - Size + TraceIpldOp: + type: string + enum: + - Get + - Put + - Unknown TraceResult: anyOf: - $ref: "#/components/schemas/EthCallTraceResult" diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index 65ed1a0d30b6..14a40a8e331e 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -6096,6 +6096,14 @@ components: anyOf: - $ref: "#/components/schemas/ActorTrace" - type: "null" + IpldOps: + type: array + items: + $ref: "#/components/schemas/TraceIpld" + Logs: + type: array + items: + type: string Msg: $ref: "#/components/schemas/MessageTrace" MsgRct: @@ -6568,6 +6576,9 @@ components: UpgradeWatermelonHeight: type: integer format: int64 + UpgradeXxHeight: + type: integer + format: int64 required: - UpgradeSmokeHeight - UpgradeBreezeHeight @@ -6601,6 +6612,7 @@ components: - UpgradeTeepHeight - UpgradeTockHeight - UpgradeGoldenWeekHeight + - UpgradeXxHeight GasTrace: type: object properties: @@ -7168,6 +7180,10 @@ components: minimum: 0 ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" + GenesisTimestamp: + type: integer + format: uint64 + minimum: 0 NetworkName: type: string PreCommitChallengeDelay: @@ -7180,6 +7196,7 @@ components: - PreCommitChallengeDelay - ForkUpgradeParams - Eip155ChainID + - GenesisTimestamp NetworkVersion: description: "Specifies the network version\n\n# Examples\n```\n# use forest::doctest_private::NetworkVersion;\nlet v0 = NetworkVersion::V0;\n\n// dereference to convert to FVM4\nassert_eq!(fvm_shared4::version::NetworkVersion::V0, *v0);\n\n// use `.into()` when FVM3 has to be specified.\nassert_eq!(fvm_shared3::version::NetworkVersion::V0, v0.into());\n\n// use `.into()` when FVM2 has to be specified.\nassert_eq!(fvm_shared2::version::NetworkVersion::V0, v0.into());\n```" type: integer @@ -7544,6 +7561,10 @@ components: properties: APIVersion: $ref: "#/components/schemas/ShiftingVersion" + Agent: + type: + - string + - "null" BlockDelay: type: integer format: uint32 @@ -7901,6 +7922,28 @@ components: anyOf: - $ref: "#/components/schemas/EthCallTraceAction" - $ref: "#/components/schemas/EthCreateTraceAction" + TraceIpld: + description: "IPLD operation details attached to an [`ExecutionTrace`]." + type: object + properties: + Cid: + $ref: "#/components/schemas/Cid" + Op: + $ref: "#/components/schemas/TraceIpldOp" + Size: + type: integer + format: uint64 + minimum: 0 + required: + - Op + - Cid + - Size + TraceIpldOp: + type: string + enum: + - Get + - Put + - Unknown TraceResult: anyOf: - $ref: "#/components/schemas/EthCallTraceResult" diff --git a/src/state_manager/utils.rs b/src/state_manager/utils.rs index b8fbda9f7de0..53e3fcd865eb 100644 --- a/src/state_manager/utils.rs +++ b/src/state_manager/utils.rs @@ -669,6 +669,8 @@ pub mod structured { gas_charges, subcalls, invoked_actor: actor_trace, + logs: vec![], + ipld_ops: vec![], }); } } From 073a2c85dd9b1572f37bb7bf755640a37eb7d58e Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 28 Apr 2026 02:13:27 +0530 Subject: [PATCH 02/14] fix MessageLotusJson --- src/lotus_json/message.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lotus_json/message.rs b/src/lotus_json/message.rs index 306803b95821..86bd487eeb49 100644 --- a/src/lotus_json/message.rs +++ b/src/lotus_json/message.rs @@ -5,6 +5,7 @@ use super::*; use crate::shim::{address::Address, econ::TokenAmount, message::Message}; use fvm_ipld_encoding::RawBytes; +use ::cid::Cid; #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "PascalCase")] @@ -40,6 +41,14 @@ pub struct MessageLotusJson { default )] params: Option, + #[schemars(with = "LotusJson>")] + #[serde( + with = "crate::lotus_json", + rename = "CID", + default, + skip_serializing_if = "Option::is_none" + )] + cid: Option, } impl HasLotusJson for Message { @@ -47,6 +56,8 @@ impl HasLotusJson for Message { #[cfg(test)] fn snapshots() -> Vec<(serde_json::Value, Self)> { + let msg = Message::default(); + let cid = msg.cid(); vec![( json!({ "From": "f00", @@ -59,12 +70,14 @@ impl HasLotusJson for Message { "To": "f00", "Value": "0", "Version": 0, + "CID": { "/": cid.to_string() }, }), - Message::default(), + msg, )] } fn into_lotus_json(self) -> Self::LotusJson { + let cid = self.cid(); let Self { version, from, @@ -88,6 +101,7 @@ impl HasLotusJson for Message { gas_premium, method: method_num, params: Some(params), + cid: Some(cid), } } @@ -103,6 +117,7 @@ impl HasLotusJson for Message { gas_premium, method, params, + cid: _, } = lotus_json; Self { version, From bd9b661257dbe1eb097d68e3b2513170436be170 Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 28 Apr 2026 06:49:52 +0530 Subject: [PATCH 03/14] fix test --- src/lotus_json/signed_message.rs | 3 +++ src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap | 2 ++ src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/lotus_json/signed_message.rs b/src/lotus_json/signed_message.rs index 08d029c22693..2043f76c37f8 100644 --- a/src/lotus_json/signed_message.rs +++ b/src/lotus_json/signed_message.rs @@ -52,6 +52,9 @@ impl HasLotusJson for SignedMessage { "To": "f00", "Value": "0", "Version": 0, + "CID": { + "/": "bafy2bzaced3xdk2uf6azekyxgcttujvy3fzyeqmibtpjf2fxcpfdx2zcx4s3g" + }, }, "Signature": {"Type": 2, "Data": "aGVsbG8gd29ybGQh"}, "CID": { diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index 7ff2912c1eaf..7e4db4a3bfc3 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -6607,6 +6607,8 @@ components: Message: type: object properties: + CID: + $ref: "#/components/schemas/Nullable_Cid" From: $ref: "#/components/schemas/Address" GasFeeCap: diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index 14a40a8e331e..a1c17c160ede 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -6823,6 +6823,8 @@ components: Message: type: object properties: + CID: + $ref: "#/components/schemas/Nullable_Cid" From: $ref: "#/components/schemas/Address" GasFeeCap: From e15b409151786ceaaf32e7d33dd0814d55c3c230 Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 28 Apr 2026 07:16:01 +0530 Subject: [PATCH 04/14] update test snapshot --- src/tool/subcommands/api_cmd/test_snapshots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool/subcommands/api_cmd/test_snapshots.txt b/src/tool/subcommands/api_cmd/test_snapshots.txt index bf6f1c036657..ab5a58049f8a 100644 --- a/src/tool/subcommands/api_cmd/test_snapshots.txt +++ b/src/tool/subcommands/api_cmd/test_snapshots.txt @@ -283,7 +283,7 @@ filecoin_stategetbeaconentry_1737546933208724.rpcsnap.json.zst filecoin_stategetclaim_1737546933208940.rpcsnap.json.zst filecoin_stategetclaims_1737546933208977.rpcsnap.json.zst filecoin_stategetid_1764943126105310.rpcsnap.json.zst -filecoin_stategetnetworkparams_1774522153615694.rpcsnap.json.zst +filecoin_stategetnetworkparams_1777338537413400.rpcsnap.json.zst filecoin_stategetrandomnessdigestfrombeacon_1737546933236534.rpcsnap.json.zst filecoin_stategetrandomnessdigestfromtickets_1737546933236558.rpcsnap.json.zst filecoin_stategetrandomnessfrombeacon_1737546933236581.rpcsnap.json.zst From 0869652ba17ea2764df615cf142b46becb0f14f7 Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 29 Apr 2026 10:23:26 +0530 Subject: [PATCH 05/14] drop FlattenedApiMessage --- docs/openrpc-specs/v0.json | 78 ++----------------- docs/openrpc-specs/v1.json | 78 ++----------------- src/lotus_json/message.rs | 14 ++-- src/rpc/methods/chain.rs | 17 +--- src/rpc/methods/gas.rs | 6 +- .../forest__rpc__tests__rpc__v0.snap | 55 +------------ .../forest__rpc__tests__rpc__v1.snap | 55 +------------ .../subcommands/api_cmd/api_compare_tests.rs | 4 +- .../subcommands/api_cmd/stateful_tests.rs | 4 +- src/wallet/subcommands/wallet_cmd.rs | 3 +- 10 files changed, 35 insertions(+), 279 deletions(-) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index 47a1607a10a8..c1ed382d412c 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -432,7 +432,7 @@ "name": "Filecoin.ChainGetMessage.Result", "required": true, "schema": { - "$ref": "#/components/schemas/FlattenedApiMessage" + "$ref": "#/components/schemas/Message" } }, "paramStructure": "by-position" @@ -2280,7 +2280,7 @@ "name": "Filecoin.GasEstimateMessageGas.Result", "required": true, "schema": { - "$ref": "#/components/schemas/FlattenedApiMessage" + "$ref": "#/components/schemas/Message" } }, "paramStructure": "by-position" @@ -9840,64 +9840,6 @@ "Signature" ] }, - "FlattenedApiMessage": { - "type": "object", - "properties": { - "CID": { - "$ref": "#/components/schemas/Cid" - }, - "From": { - "$ref": "#/components/schemas/Address" - }, - "GasFeeCap": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "GasLimit": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "GasPremium": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "Method": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "Nonce": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "Params": { - "$ref": "#/components/schemas/Nullable_Base64String" - }, - "To": { - "$ref": "#/components/schemas/Address" - }, - "Value": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "Version": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - } - }, - "required": [ - "To", - "From", - "CID" - ] - }, "ForestChainExportDiffParams": { "type": "object", "properties": { @@ -10398,6 +10340,9 @@ "Message": { "type": "object", "properties": { + "CID": { + "$ref": "#/components/schemas/Nullable_Cid" + }, "From": { "$ref": "#/components/schemas/Address" }, @@ -10428,7 +10373,8 @@ "minimum": 0 }, "Params": { - "$ref": "#/components/schemas/Nullable_Base64String" + "$ref": "#/components/schemas/Base64String", + "default": null }, "To": { "$ref": "#/components/schemas/Address" @@ -11162,16 +11108,6 @@ "minimum": 0 } }, - "Nullable_Base64String": { - "anyOf": [ - { - "$ref": "#/components/schemas/Base64String" - }, - { - "type": "null" - } - ] - }, "Nullable_Cid": { "anyOf": [ { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index dd6bb50f7e03..de034a4a3da4 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -424,7 +424,7 @@ "name": "Filecoin.ChainGetMessage.Result", "required": true, "schema": { - "$ref": "#/components/schemas/FlattenedApiMessage" + "$ref": "#/components/schemas/Message" } }, "paramStructure": "by-position" @@ -2272,7 +2272,7 @@ "name": "Filecoin.GasEstimateMessageGas.Result", "required": true, "schema": { - "$ref": "#/components/schemas/FlattenedApiMessage" + "$ref": "#/components/schemas/Message" } }, "paramStructure": "by-position" @@ -10054,64 +10054,6 @@ "Signature" ] }, - "FlattenedApiMessage": { - "type": "object", - "properties": { - "CID": { - "$ref": "#/components/schemas/Cid" - }, - "From": { - "$ref": "#/components/schemas/Address" - }, - "GasFeeCap": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "GasLimit": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "GasPremium": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "Method": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "Nonce": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - }, - "Params": { - "$ref": "#/components/schemas/Nullable_Base64String" - }, - "To": { - "$ref": "#/components/schemas/Address" - }, - "Value": { - "$ref": "#/components/schemas/TokenAmount", - "default": "0" - }, - "Version": { - "type": "integer", - "format": "uint64", - "default": 0, - "minimum": 0 - } - }, - "required": [ - "To", - "From", - "CID" - ] - }, "ForestChainExportDiffParams": { "type": "object", "properties": { @@ -10779,6 +10721,9 @@ "Message": { "type": "object", "properties": { + "CID": { + "$ref": "#/components/schemas/Nullable_Cid" + }, "From": { "$ref": "#/components/schemas/Address" }, @@ -10809,7 +10754,8 @@ "minimum": 0 }, "Params": { - "$ref": "#/components/schemas/Nullable_Base64String" + "$ref": "#/components/schemas/Base64String", + "default": null }, "To": { "$ref": "#/components/schemas/Address" @@ -11554,16 +11500,6 @@ "minimum": 0 } }, - "Nullable_Base64String": { - "anyOf": [ - { - "$ref": "#/components/schemas/Base64String" - }, - { - "type": "null" - } - ] - }, "Nullable_Cid": { "anyOf": [ { diff --git a/src/lotus_json/message.rs b/src/lotus_json/message.rs index 86bd487eeb49..37133b5dc9ff 100644 --- a/src/lotus_json/message.rs +++ b/src/lotus_json/message.rs @@ -34,13 +34,9 @@ pub struct MessageLotusJson { gas_premium: TokenAmount, #[serde(default)] method: u64, - #[schemars(with = "LotusJson>")] - #[serde( - with = "crate::lotus_json", - skip_serializing_if = "Option::is_none", - default - )] - params: Option, + #[schemars(with = "LotusJson")] + #[serde(with = "crate::lotus_json", default)] + params: RawBytes, #[schemars(with = "LotusJson>")] #[serde( with = "crate::lotus_json", @@ -100,7 +96,7 @@ impl HasLotusJson for Message { gas_fee_cap, gas_premium, method: method_num, - params: Some(params), + params, cid: Some(cid), } } @@ -126,7 +122,7 @@ impl HasLotusJson for Message { sequence: nonce, value, method_num: method, - params: params.unwrap_or_default(), + params, gas_limit, gas_fee_cap, gas_premium, diff --git a/src/rpc/methods/chain.rs b/src/rpc/methods/chain.rs index c5d52a3d1c91..d68de2ea27d2 100644 --- a/src/rpc/methods/chain.rs +++ b/src/rpc/methods/chain.rs @@ -182,7 +182,7 @@ impl RpcMethod<1> for ChainGetMessage { const DESCRIPTION: Option<&'static str> = Some("Returns the message with the specified CID."); type Params = (Cid,); - type Ok = FlattenedApiMessage; + type Ok = Message; async fn handle( ctx: Ctx, @@ -198,8 +198,7 @@ impl RpcMethod<1> for ChainGetMessage { ChainMessage::Unsigned(m) => Arc::unwrap_or_clone(m), }; - let cid = message.cid(); - Ok(FlattenedApiMessage { message, cid }) + Ok(message) } } @@ -1511,18 +1510,6 @@ pub struct ApiMessage { lotus_json_with_self!(ApiMessage); -#[derive(Serialize, Deserialize, JsonSchema, Clone, Debug, Eq, PartialEq)] -pub struct FlattenedApiMessage { - #[serde(flatten, with = "crate::lotus_json")] - #[schemars(with = "LotusJson")] - pub message: Message, - #[serde(rename = "CID", with = "crate::lotus_json")] - #[schemars(with = "LotusJson")] - pub cid: Cid, -} - -lotus_json_with_self!(FlattenedApiMessage); - #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] pub struct ForestChainExportParams { pub version: FilecoinSnapshotVersion, diff --git a/src/rpc/methods/gas.rs b/src/rpc/methods/gas.rs index 167269dd92b7..6dba16353fc5 100644 --- a/src/rpc/methods/gas.rs +++ b/src/rpc/methods/gas.rs @@ -5,7 +5,6 @@ use super::state::InvocResult; use crate::blocks::Tipset; use crate::chain::{BASE_FEE_MAX_CHANGE_DENOM, BLOCK_GAS_TARGET}; use crate::message::{ChainMessage, MessageRead as _, MessageReadWrite as _, SignedMessage}; -use crate::rpc::chain::FlattenedApiMessage; use crate::rpc::{ApiPaths, Ctx, Permission, RpcMethod, error::ServerError, types::*}; use crate::shim::executor::ApplyRet; use crate::shim::{ @@ -305,7 +304,7 @@ impl RpcMethod<3> for GasEstimateMessageGas { Some("Returns the estimated gas for the given parameters."); type Params = (Message, Option, ApiTipsetKey); - type Ok = FlattenedApiMessage; + type Ok = Message; async fn handle( ctx: Ctx, @@ -313,8 +312,7 @@ impl RpcMethod<3> for GasEstimateMessageGas { _: &http::Extensions, ) -> Result { let message = estimate_message_gas(&ctx, msg, spec, tsk).await?; - let cid = message.cid(); - Ok(FlattenedApiMessage { message, cid }) + Ok(message) } } diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index 7e4db4a3bfc3..269919875618 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -147,7 +147,7 @@ methods: name: Filecoin.ChainGetMessage.Result required: true schema: - $ref: "#/components/schemas/FlattenedApiMessage" + $ref: "#/components/schemas/Message" paramStructure: by-position - name: Filecoin.ChainGetMessagesInTipset params: @@ -1846,7 +1846,7 @@ methods: name: Filecoin.GasEstimateMessageGas.Result required: true schema: - $ref: "#/components/schemas/FlattenedApiMessage" + $ref: "#/components/schemas/Message" paramStructure: by-position - name: Filecoin.MarketAddBalance params: @@ -6187,50 +6187,6 @@ components: - SupplementalData - Signers - Signature - FlattenedApiMessage: - type: object - properties: - CID: - $ref: "#/components/schemas/Cid" - From: - $ref: "#/components/schemas/Address" - GasFeeCap: - $ref: "#/components/schemas/TokenAmount" - default: "0" - GasLimit: - type: integer - format: uint64 - default: 0 - minimum: 0 - GasPremium: - $ref: "#/components/schemas/TokenAmount" - default: "0" - Method: - type: integer - format: uint64 - default: 0 - minimum: 0 - Nonce: - type: integer - format: uint64 - default: 0 - minimum: 0 - Params: - $ref: "#/components/schemas/Nullable_Base64String" - To: - $ref: "#/components/schemas/Address" - Value: - $ref: "#/components/schemas/TokenAmount" - default: "0" - Version: - type: integer - format: uint64 - default: 0 - minimum: 0 - required: - - To - - From - - CID ForestChainExportDiffParams: type: object properties: @@ -6633,7 +6589,8 @@ components: default: 0 minimum: 0 Params: - $ref: "#/components/schemas/Nullable_Base64String" + $ref: "#/components/schemas/Base64String" + default: ~ To: $ref: "#/components/schemas/Address" Value: @@ -7154,10 +7111,6 @@ components: type: integer format: uint64 minimum: 0 - Nullable_Base64String: - anyOf: - - $ref: "#/components/schemas/Base64String" - - type: "null" Nullable_Cid: anyOf: - $ref: "#/components/schemas/Cid" diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index a1c17c160ede..04715cd13601 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -143,7 +143,7 @@ methods: name: Filecoin.ChainGetMessage.Result required: true schema: - $ref: "#/components/schemas/FlattenedApiMessage" + $ref: "#/components/schemas/Message" paramStructure: by-position - name: Filecoin.ChainGetMessagesInTipset params: @@ -1926,7 +1926,7 @@ methods: name: Filecoin.GasEstimateMessageGas.Result required: true schema: - $ref: "#/components/schemas/FlattenedApiMessage" + $ref: "#/components/schemas/Message" paramStructure: by-position - name: Filecoin.MarketAddBalance params: @@ -6306,50 +6306,6 @@ components: - SupplementalData - Signers - Signature - FlattenedApiMessage: - type: object - properties: - CID: - $ref: "#/components/schemas/Cid" - From: - $ref: "#/components/schemas/Address" - GasFeeCap: - $ref: "#/components/schemas/TokenAmount" - default: "0" - GasLimit: - type: integer - format: uint64 - default: 0 - minimum: 0 - GasPremium: - $ref: "#/components/schemas/TokenAmount" - default: "0" - Method: - type: integer - format: uint64 - default: 0 - minimum: 0 - Nonce: - type: integer - format: uint64 - default: 0 - minimum: 0 - Params: - $ref: "#/components/schemas/Nullable_Base64String" - To: - $ref: "#/components/schemas/Address" - Value: - $ref: "#/components/schemas/TokenAmount" - default: "0" - Version: - type: integer - format: uint64 - default: 0 - minimum: 0 - required: - - To - - From - - CID ForestChainExportDiffParams: type: object properties: @@ -6849,7 +6805,8 @@ components: default: 0 minimum: 0 Params: - $ref: "#/components/schemas/Nullable_Base64String" + $ref: "#/components/schemas/Base64String" + default: ~ To: $ref: "#/components/schemas/Address" Value: @@ -7378,10 +7335,6 @@ components: type: integer format: uint64 minimum: 0 - Nullable_Base64String: - anyOf: - - $ref: "#/components/schemas/Base64String" - - type: "null" Nullable_Cid: anyOf: - $ref: "#/components/schemas/Cid" diff --git a/src/tool/subcommands/api_cmd/api_compare_tests.rs b/src/tool/subcommands/api_cmd/api_compare_tests.rs index 6d5bad680bcc..1319fafd73ab 100644 --- a/src/tool/subcommands/api_cmd/api_compare_tests.rs +++ b/src/tool/subcommands/api_cmd/api_compare_tests.rs @@ -2375,9 +2375,7 @@ fn gas_tests_with_tipset(shared_tipset: &Tipset) -> Vec { shared_tipset.key().into(), )) .unwrap(), - |forest_api_msg, lotus_api_msg| { - let forest_msg = forest_api_msg.message; - let lotus_msg = lotus_api_msg.message; + |forest_msg, lotus_msg| { // Validate that the gas limit is identical (must be deterministic) if forest_msg.gas_limit != lotus_msg.gas_limit { return false; diff --git a/src/tool/subcommands/api_cmd/stateful_tests.rs b/src/tool/subcommands/api_cmd/stateful_tests.rs index 53658b54717f..7feed17c22e2 100644 --- a/src/tool/subcommands/api_cmd/stateful_tests.rs +++ b/src/tool/subcommands/api_cmd/stateful_tests.rs @@ -344,14 +344,14 @@ async fn invoke_contract(client: &rpc::Client, tx: &TestTransaction) -> anyhow:: let eth_tx_args = crate::eth::EthEip1559TxArgsBuilder::default() .chain_id(ETH_CHAIN_ID) - .unsigned_message(&unsigned_msg.message)? + .unsigned_message(&unsigned_msg)? .build() .map_err(|e| anyhow::anyhow!("Failed to build EIP-1559 transaction: {}", e))?; let eth_tx = crate::eth::EthTx::from(eth_tx_args); let data = eth_tx.rlp_unsigned_message(ETH_CHAIN_ID)?; let sig = client.call(WalletSign::request((tx.from, data))?).await?; - let smsg = SignedMessage::new_unchecked(unsigned_msg.message, sig); + let smsg = SignedMessage::new_unchecked(unsigned_msg, sig); let cid = smsg.cid(); client.call(MpoolPush::request((smsg,))?).await?; diff --git a/src/wallet/subcommands/wallet_cmd.rs b/src/wallet/subcommands/wallet_cmd.rs index c5aa7940f07e..f771a3ebcea5 100644 --- a/src/wallet/subcommands/wallet_cmd.rs +++ b/src/wallet/subcommands/wallet_cmd.rs @@ -545,8 +545,7 @@ impl WalletCommands { &backend.remote, (message, spec, ApiTipsetKey(None)), ) - .await? - .message; + .await?; if message.gas_premium > message.gas_fee_cap { anyhow::bail!("After estimation, gas premium is greater than gas fee cap") From 448121aae1ba6ea49f85c752f8ede462d650951b Mon Sep 17 00:00:00 2001 From: Shashank Date: Thu, 30 Apr 2026 08:09:16 +0530 Subject: [PATCH 06/14] update network upgrade param --- docs/openrpc-specs/v0.json | 10 +++++----- docs/openrpc-specs/v1.json | 10 +++++----- src/rpc/methods/state.rs | 6 +++--- src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap | 8 ++++---- src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap | 8 ++++---- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index c1ed382d412c..16f52490dee7 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -10048,6 +10048,10 @@ "type": "integer", "format": "int64" }, + "UpgradeFireHorseHeight": { + "type": "integer", + "format": "int64" + }, "UpgradeGoldenWeekHeight": { "type": "integer", "format": "int64" @@ -10147,10 +10151,6 @@ "UpgradeWatermelonHeight": { "type": "integer", "format": "int64" - }, - "UpgradeXxHeight": { - "type": "integer", - "format": "int64" } }, "required": [ @@ -10186,7 +10186,7 @@ "UpgradeTeepHeight", "UpgradeTockHeight", "UpgradeGoldenWeekHeight", - "UpgradeXxHeight" + "UpgradeFireHorseHeight" ] }, "GasTrace": { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index de034a4a3da4..50bfd83413ea 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -10262,6 +10262,10 @@ "type": "integer", "format": "int64" }, + "UpgradeFireHorseHeight": { + "type": "integer", + "format": "int64" + }, "UpgradeGoldenWeekHeight": { "type": "integer", "format": "int64" @@ -10361,10 +10365,6 @@ "UpgradeWatermelonHeight": { "type": "integer", "format": "int64" - }, - "UpgradeXxHeight": { - "type": "integer", - "format": "int64" } }, "required": [ @@ -10400,7 +10400,7 @@ "UpgradeTeepHeight", "UpgradeTockHeight", "UpgradeGoldenWeekHeight", - "UpgradeXxHeight" + "UpgradeFireHorseHeight" ] }, "GasTrace": { diff --git a/src/rpc/methods/state.rs b/src/rpc/methods/state.rs index 09149fe0553d..7bebf96dc45e 100644 --- a/src/rpc/methods/state.rs +++ b/src/rpc/methods/state.rs @@ -3231,7 +3231,8 @@ pub struct ForkUpgradeParams { upgrade_teep_height: ChainEpoch, upgrade_tock_height: ChainEpoch, upgrade_golden_week_height: ChainEpoch, - upgrade_xx_height: ChainEpoch, + upgrade_fire_horse_height: ChainEpoch, + //upgrade_xxx_height: ChainEpoch, } impl TryFrom<&ChainConfig> for ForkUpgradeParams { @@ -3280,8 +3281,7 @@ impl TryFrom<&ChainConfig> for ForkUpgradeParams { upgrade_teep_height: get_height(Teep)?, upgrade_tock_height: get_height(Tock)?, upgrade_golden_week_height: get_height(GoldenWeek)?, - //upgrade_firehorse_height: get_height(FireHorse)?, - upgrade_xx_height: 999_999_999_999_999, + upgrade_fire_horse_height: get_height(FireHorse)?, }) } } diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index 269919875618..ec22c20862db 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -6338,6 +6338,9 @@ components: UpgradeDragonHeight: type: integer format: int64 + UpgradeFireHorseHeight: + type: integer + format: int64 UpgradeGoldenWeekHeight: type: integer format: int64 @@ -6413,9 +6416,6 @@ components: UpgradeWatermelonHeight: type: integer format: int64 - UpgradeXxHeight: - type: integer - format: int64 required: - UpgradeSmokeHeight - UpgradeBreezeHeight @@ -6449,7 +6449,7 @@ components: - UpgradeTeepHeight - UpgradeTockHeight - UpgradeGoldenWeekHeight - - UpgradeXxHeight + - UpgradeFireHorseHeight GasTrace: type: object properties: diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index 04715cd13601..ca661198ccf5 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -6457,6 +6457,9 @@ components: UpgradeDragonHeight: type: integer format: int64 + UpgradeFireHorseHeight: + type: integer + format: int64 UpgradeGoldenWeekHeight: type: integer format: int64 @@ -6532,9 +6535,6 @@ components: UpgradeWatermelonHeight: type: integer format: int64 - UpgradeXxHeight: - type: integer - format: int64 required: - UpgradeSmokeHeight - UpgradeBreezeHeight @@ -6568,7 +6568,7 @@ components: - UpgradeTeepHeight - UpgradeTockHeight - UpgradeGoldenWeekHeight - - UpgradeXxHeight + - UpgradeFireHorseHeight GasTrace: type: object properties: From b49052ad5ca1a1c9f0b1cce8a877cd9858ba6ef1 Mon Sep 17 00:00:00 2001 From: Shashank Date: Thu, 30 Apr 2026 08:26:44 +0530 Subject: [PATCH 07/14] update test snapshot --- src/tool/subcommands/api_cmd/test_snapshots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool/subcommands/api_cmd/test_snapshots.txt b/src/tool/subcommands/api_cmd/test_snapshots.txt index ab5a58049f8a..d9cc70691716 100644 --- a/src/tool/subcommands/api_cmd/test_snapshots.txt +++ b/src/tool/subcommands/api_cmd/test_snapshots.txt @@ -283,7 +283,7 @@ filecoin_stategetbeaconentry_1737546933208724.rpcsnap.json.zst filecoin_stategetclaim_1737546933208940.rpcsnap.json.zst filecoin_stategetclaims_1737546933208977.rpcsnap.json.zst filecoin_stategetid_1764943126105310.rpcsnap.json.zst -filecoin_stategetnetworkparams_1777338537413400.rpcsnap.json.zst +filecoin_stategetnetworkparams_1777517671344321.rpcsnap.json.zst filecoin_stategetrandomnessdigestfrombeacon_1737546933236534.rpcsnap.json.zst filecoin_stategetrandomnessdigestfromtickets_1737546933236558.rpcsnap.json.zst filecoin_stategetrandomnessfrombeacon_1737546933236581.rpcsnap.json.zst From 652e5b351ccb56be076f44cf047f62729cd00bb5 Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 5 May 2026 13:15:26 +0530 Subject: [PATCH 08/14] fix agent type --- docs/openrpc-specs/v0.json | 8 +++----- docs/openrpc-specs/v1.json | 8 +++----- src/rpc/methods/common.rs | 5 ++--- src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap | 5 ++--- src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap | 5 ++--- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index 74d89fd887cb..879710221658 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -11378,10 +11378,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { - "type": [ - "string", - "null" - ] + "type": "string" }, "BlockDelay": { "type": "integer", @@ -11395,7 +11392,8 @@ "required": [ "Version", "APIVersion", - "BlockDelay" + "BlockDelay", + "Agent" ] }, "Receipt": { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index 22e99363e0f7..527c9c276d65 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -11790,10 +11790,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { - "type": [ - "string", - "null" - ] + "type": "string" }, "BlockDelay": { "type": "integer", @@ -11807,7 +11804,8 @@ "required": [ "Version", "APIVersion", - "BlockDelay" + "BlockDelay", + "Agent" ] }, "Receipt": { diff --git a/src/rpc/methods/common.rs b/src/rpc/methods/common.rs index 0a78661d4bf4..ecfd1a09464d 100644 --- a/src/rpc/methods/common.rs +++ b/src/rpc/methods/common.rs @@ -55,7 +55,7 @@ impl RpcMethod<0> for Version { // For the API v0, we don't support it but it should be `1.5.0`. api_version: ShiftingVersion::new(2, 3, 0), block_delay: ctx.chain_config().block_delay_secs, - agent: None, + agent: "forest".into(), }) } } @@ -107,8 +107,7 @@ pub struct PublicVersion { #[serde(rename = "APIVersion")] pub api_version: ShiftingVersion, pub block_delay: u32, - #[serde(default, skip_serializing_if = "Option::is_none")] - pub agent: Option, + pub agent: String, } lotus_json_with_self!(PublicVersion); diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index 45e960c3094e..774136e5213e 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -7281,9 +7281,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: - type: - - string - - "null" + type: string BlockDelay: type: integer format: uint32 @@ -7294,6 +7292,7 @@ components: - Version - APIVersion - BlockDelay + - Agent Receipt: type: object properties: diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index c36939c7c6f8..9076394fc8c4 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -7517,9 +7517,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: - type: - - string - - "null" + type: string BlockDelay: type: integer format: uint32 @@ -7530,6 +7528,7 @@ components: - Version - APIVersion - BlockDelay + - Agent Receipt: type: object properties: From 42516155518f0c7da9fcb6d6a6b31645d5e58cf3 Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 5 May 2026 22:02:00 +0530 Subject: [PATCH 09/14] fix ExecutionTrace --- src/rpc/methods/state/types.rs | 25 +++++++++++++------------ src/state_manager/utils.rs | 22 +++++++++++++++++----- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/rpc/methods/state/types.rs b/src/rpc/methods/state/types.rs index e41bacf1f3e7..1715d1e3e8cb 100644 --- a/src/rpc/methods/state/types.rs +++ b/src/rpc/methods/state/types.rs @@ -11,6 +11,7 @@ use crate::shim::{ econ::TokenAmount, error::ExitCode, executor::Receipt, + fvm_latest::trace::IpldOperation, message::Message, state_tree::{ActorID, ActorState}, }; @@ -172,6 +173,15 @@ impl JsonSchema for TraceIpldOp { } } +impl From for TraceIpldOp { + fn from(op: IpldOperation) -> Self { + match op { + IpldOperation::Get => Self::Get, + IpldOperation::Put => Self::Put, + } + } +} + /// IPLD operation details attached to an [`ExecutionTrace`]. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "PascalCase")] @@ -185,7 +195,7 @@ pub struct TraceIpld { lotus_json_with_self!(TraceIpld); -#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "PascalCase")] pub struct ExecutionTrace { pub msg: MessageTrace, @@ -195,23 +205,14 @@ pub struct ExecutionTrace { #[serde(with = "crate::lotus_json")] #[schemars(with = "LotusJson>")] pub subcalls: Vec, + /// See #[serde(default, skip_serializing_if = "Vec::is_empty")] pub logs: Vec, + /// See #[serde(default, skip_serializing_if = "Vec::is_empty")] pub ipld_ops: Vec, } -impl PartialEq for ExecutionTrace { - /// Ignore [`Self::logs`] and [`Self::ipld_ops`] as they are implementation-dependent - fn eq(&self, other: &Self) -> bool { - self.msg == other.msg - && self.msg_rct == other.msg_rct - && self.invoked_actor == other.invoked_actor - && self.gas_charges == other.gas_charges - && self.subcalls == other.subcalls - } -} - impl ExecutionTrace { pub fn sum_gas(&self) -> GasTrace { let mut out: GasTrace = GasTrace::default(); diff --git a/src/state_manager/utils.rs b/src/state_manager/utils.rs index 53e3fcd865eb..8881732e7ff3 100644 --- a/src/state_manager/utils.rs +++ b/src/state_manager/utils.rs @@ -489,7 +489,7 @@ mod test { /// Parsed tree of [`fvm4::trace::ExecutionEvent`]s pub mod structured { use crate::{ - rpc::state::{ActorTrace, ExecutionTrace, GasTrace, MessageTrace, ReturnTrace}, + rpc::state::{ActorTrace, ExecutionTrace, GasTrace, MessageTrace, ReturnTrace, TraceIpld}, shim::kernel::ErrorNumber, }; use std::collections::VecDeque; @@ -626,6 +626,8 @@ pub mod structured { let mut gas_charges = vec![]; let mut subcalls = vec![]; let mut actor_trace = None; + let mut logs = vec![]; + let mut ipld_ops = vec![]; // we don't use a for loop over `events` so we can pass them to recursive calls while let Some(event) = events.pop_front() { @@ -641,7 +643,10 @@ pub mod structured { ExecutionEvent::CallReturn(ret) => Some(CallTreeReturn::Return(ret)), ExecutionEvent::CallAbort(ab) => Some(CallTreeReturn::Abort(ab)), ExecutionEvent::CallError(e) => Some(CallTreeReturn::Error(e)), - ExecutionEvent::Log(_ignored) => None, + ExecutionEvent::Log(log) => { + logs.push(log); + None + } ExecutionEvent::InvokeActor(cid) => { actor_trace = match cid { Either::Left(_cid) => None, @@ -652,7 +657,14 @@ pub mod structured { }; None } - ExecutionEvent::Ipld { .. } => None, + ExecutionEvent::Ipld { op, cid, size } => { + ipld_ops.push(TraceIpld { + op: op.into(), + cid, + size: size as u64, + }); + None + } // RUST: This should be caught at compile time with #[deny(non_exhaustive_omitted_patterns)] // So that BuildExecutionTraceError::UnrecognisedEvent is never constructed // But that lint is not yet stabilised: https://github.com/rust-lang/rust/issues/89554 @@ -669,8 +681,8 @@ pub mod structured { gas_charges, subcalls, invoked_actor: actor_trace, - logs: vec![], - ipld_ops: vec![], + logs, + ipld_ops, }); } } From cce0f0d1a9549ccae141600bd68fbc6756757f3e Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 5 May 2026 22:02:35 +0530 Subject: [PATCH 10/14] Add ref link --- docs/openrpc-specs/v0.json | 4 ++++ docs/openrpc-specs/v1.json | 4 ++++ src/rpc/methods/common.rs | 1 + src/rpc/methods/state.rs | 1 + src/rpc/methods/state/types.rs | 1 + 5 files changed, 11 insertions(+) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index 879710221658..49e8c2583f91 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -9557,12 +9557,14 @@ ] }, "IpldOps": { + "description": "See ", "type": "array", "items": { "$ref": "#/components/schemas/TraceIpld" } }, "Logs": { + "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", "type": "array", "items": { "type": "string" @@ -10832,6 +10834,7 @@ "$ref": "#/components/schemas/ForkUpgradeParams" }, "GenesisTimestamp": { + "description": "See ", "type": "integer", "format": "uint64", "minimum": 0 @@ -11378,6 +11381,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { + "description": "See ", "type": "string" }, "BlockDelay": { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index 527c9c276d65..7f064e319c88 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -9771,12 +9771,14 @@ ] }, "IpldOps": { + "description": "See ", "type": "array", "items": { "$ref": "#/components/schemas/TraceIpld" } }, "Logs": { + "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", "type": "array", "items": { "type": "string" @@ -11213,6 +11215,7 @@ "$ref": "#/components/schemas/ForkUpgradeParams" }, "GenesisTimestamp": { + "description": "See ", "type": "integer", "format": "uint64", "minimum": 0 @@ -11790,6 +11793,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { + "description": "See ", "type": "string" }, "BlockDelay": { diff --git a/src/rpc/methods/common.rs b/src/rpc/methods/common.rs index ecfd1a09464d..f1287ffc8829 100644 --- a/src/rpc/methods/common.rs +++ b/src/rpc/methods/common.rs @@ -107,6 +107,7 @@ pub struct PublicVersion { #[serde(rename = "APIVersion")] pub api_version: ShiftingVersion, pub block_delay: u32, + /// See pub agent: String, } lotus_json_with_self!(PublicVersion); diff --git a/src/rpc/methods/state.rs b/src/rpc/methods/state.rs index 7bebf96dc45e..8de7aea5fef1 100644 --- a/src/rpc/methods/state.rs +++ b/src/rpc/methods/state.rs @@ -3191,6 +3191,7 @@ pub struct NetworkParams { fork_upgrade_params: ForkUpgradeParams, #[serde(rename = "Eip155ChainID")] eip155_chain_id: EthChainId, + /// See genesis_timestamp: u64, } diff --git a/src/rpc/methods/state/types.rs b/src/rpc/methods/state/types.rs index 1715d1e3e8cb..60a65260f5d7 100644 --- a/src/rpc/methods/state/types.rs +++ b/src/rpc/methods/state/types.rs @@ -205,6 +205,7 @@ pub struct ExecutionTrace { #[serde(with = "crate::lotus_json")] #[schemars(with = "LotusJson>")] pub subcalls: Vec, + /// FVM invocation logs (not EVM actor / `eth_getLogs` event logs). /// See #[serde(default, skip_serializing_if = "Vec::is_empty")] pub logs: Vec, From f54e7afc55a5b819a4e355a918a33434a1f75cc6 Mon Sep 17 00:00:00 2001 From: Shashank Date: Tue, 5 May 2026 23:17:34 +0530 Subject: [PATCH 11/14] fix openrpc --- src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap | 4 ++++ src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index 774136e5213e..cd1daffbd322 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -5978,10 +5978,12 @@ components: - $ref: "#/components/schemas/ActorTrace" - type: "null" IpldOps: + description: "See " type: array items: $ref: "#/components/schemas/TraceIpld" Logs: + description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " type: array items: type: string @@ -6924,6 +6926,7 @@ components: ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" GenesisTimestamp: + description: "See " type: integer format: uint64 minimum: 0 @@ -7281,6 +7284,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: + description: "See " type: string BlockDelay: type: integer diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index 9076394fc8c4..ef444efbbcbb 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -6097,10 +6097,12 @@ components: - $ref: "#/components/schemas/ActorTrace" - type: "null" IpldOps: + description: "See " type: array items: $ref: "#/components/schemas/TraceIpld" Logs: + description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " type: array items: type: string @@ -7140,6 +7142,7 @@ components: ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" GenesisTimestamp: + description: "See " type: integer format: uint64 minimum: 0 @@ -7517,6 +7520,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: + description: "See " type: string BlockDelay: type: integer From 91d952b8180c77686ea1597c3b2fa15683a5aaa6 Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 6 May 2026 01:59:50 +0530 Subject: [PATCH 12/14] fix old comment --- src/rpc/methods/state/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/methods/state/types.rs b/src/rpc/methods/state/types.rs index 60a65260f5d7..a5eaf858eb1f 100644 --- a/src/rpc/methods/state/types.rs +++ b/src/rpc/methods/state/types.rs @@ -291,7 +291,7 @@ pub struct GasTrace { lotus_json_with_self!(GasTrace); impl PartialEq for GasTrace { - /// Ignore [`Self::total_gas`] as it is implementation-dependent + /// Ignore [`Self::time_taken`] as it is implementation-dependent fn eq(&self, other: &Self) -> bool { self.name == other.name && self.total_gas == other.total_gas From a29c1b5441b3c8809a623552c83631ceb33bc567 Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 6 May 2026 02:18:51 +0530 Subject: [PATCH 13/14] update test snapshot --- src/tool/subcommands/api_cmd/test_snapshots.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tool/subcommands/api_cmd/test_snapshots.txt b/src/tool/subcommands/api_cmd/test_snapshots.txt index d9cc70691716..f4dc4428dc30 100644 --- a/src/tool/subcommands/api_cmd/test_snapshots.txt +++ b/src/tool/subcommands/api_cmd/test_snapshots.txt @@ -252,9 +252,9 @@ filecoin_power_onepochtickend_statedecodeparams_1754479441718920.rpcsnap.json.zs filecoin_reward_thisepochreward_statedecodeparams_1754479441718972.rpcsnap.json.zst filecoin_session_1741781372985818.rpcsnap.json.zst filecoin_stateaccountkey_1741783761556416.rpcsnap.json.zst -filecoin_statecall_1743503294940970.rpcsnap.json.zst +filecoin_statecall_1778013726767345.rpcsnap.json.zst filecoin_statecirculatingsupply_1737546950391069.rpcsnap.json.zst -filecoin_statecompute_1743430909413047.rpcsnap.json.zst +filecoin_statecompute_1778013740986027.rpcsnap.json.zst filecoin_statedealprovidercollateralbounds_1737546933164491.rpcsnap.json.zst filecoin_statedecodeparams_1749826976834943.rpcsnap.json.zst filecoin_statedecodeparams_1749826976835026.rpcsnap.json.zst @@ -329,7 +329,7 @@ filecoin_statereadstate_1748425541558368.rpcsnap.json.zst filecoin_statereadstate_1748444218790447.rpcsnap.json.zst filecoin_statereadstate_1748444218790807.rpcsnap.json.zst filecoin_statereadstate_1749657617007020.rpcsnap.json.zst -filecoin_statereplay_1743504051038215.rpcsnap.json.zst +filecoin_statereplay_1778013757068094.rpcsnap.json.zst filecoin_statesearchmsg_1767947430707712.rpcsnap.json.zst filecoin_statesearchmsglimited_1767936905056090.rpcsnap.json.zst filecoin_statesectorexpiration_1741784727996672.rpcsnap.json.zst From 9152064d12b90a1267e96374778ce33772988189 Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 6 May 2026 09:32:16 +0530 Subject: [PATCH 14/14] pin latest instead of master --- docs/openrpc-specs/v0.json | 8 ++++---- docs/openrpc-specs/v1.json | 8 ++++---- src/rpc/methods/common.rs | 2 +- src/rpc/methods/state.rs | 2 +- src/rpc/methods/state/types.rs | 4 ++-- src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap | 8 ++++---- src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap | 8 ++++---- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/openrpc-specs/v0.json b/docs/openrpc-specs/v0.json index 49e8c2583f91..875dee640c79 100644 --- a/docs/openrpc-specs/v0.json +++ b/docs/openrpc-specs/v0.json @@ -9557,14 +9557,14 @@ ] }, "IpldOps": { - "description": "See ", + "description": "See ", "type": "array", "items": { "$ref": "#/components/schemas/TraceIpld" } }, "Logs": { - "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", + "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", "type": "array", "items": { "type": "string" @@ -10834,7 +10834,7 @@ "$ref": "#/components/schemas/ForkUpgradeParams" }, "GenesisTimestamp": { - "description": "See ", + "description": "See ", "type": "integer", "format": "uint64", "minimum": 0 @@ -11381,7 +11381,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { - "description": "See ", + "description": "See ", "type": "string" }, "BlockDelay": { diff --git a/docs/openrpc-specs/v1.json b/docs/openrpc-specs/v1.json index 7f064e319c88..d18d854c29bb 100644 --- a/docs/openrpc-specs/v1.json +++ b/docs/openrpc-specs/v1.json @@ -9771,14 +9771,14 @@ ] }, "IpldOps": { - "description": "See ", + "description": "See ", "type": "array", "items": { "$ref": "#/components/schemas/TraceIpld" } }, "Logs": { - "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", + "description": "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee ", "type": "array", "items": { "type": "string" @@ -11215,7 +11215,7 @@ "$ref": "#/components/schemas/ForkUpgradeParams" }, "GenesisTimestamp": { - "description": "See ", + "description": "See ", "type": "integer", "format": "uint64", "minimum": 0 @@ -11793,7 +11793,7 @@ "$ref": "#/components/schemas/ShiftingVersion" }, "Agent": { - "description": "See ", + "description": "See ", "type": "string" }, "BlockDelay": { diff --git a/src/rpc/methods/common.rs b/src/rpc/methods/common.rs index f1287ffc8829..8f343e479c72 100644 --- a/src/rpc/methods/common.rs +++ b/src/rpc/methods/common.rs @@ -107,7 +107,7 @@ pub struct PublicVersion { #[serde(rename = "APIVersion")] pub api_version: ShiftingVersion, pub block_delay: u32, - /// See + /// See pub agent: String, } lotus_json_with_self!(PublicVersion); diff --git a/src/rpc/methods/state.rs b/src/rpc/methods/state.rs index 8de7aea5fef1..42a74cefe444 100644 --- a/src/rpc/methods/state.rs +++ b/src/rpc/methods/state.rs @@ -3191,7 +3191,7 @@ pub struct NetworkParams { fork_upgrade_params: ForkUpgradeParams, #[serde(rename = "Eip155ChainID")] eip155_chain_id: EthChainId, - /// See + /// See genesis_timestamp: u64, } diff --git a/src/rpc/methods/state/types.rs b/src/rpc/methods/state/types.rs index a5eaf858eb1f..ec47a5980cdb 100644 --- a/src/rpc/methods/state/types.rs +++ b/src/rpc/methods/state/types.rs @@ -206,10 +206,10 @@ pub struct ExecutionTrace { #[schemars(with = "LotusJson>")] pub subcalls: Vec, /// FVM invocation logs (not EVM actor / `eth_getLogs` event logs). - /// See + /// See #[serde(default, skip_serializing_if = "Vec::is_empty")] pub logs: Vec, - /// See + /// See #[serde(default, skip_serializing_if = "Vec::is_empty")] pub ipld_ops: Vec, } diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap index cd1daffbd322..cdaf0e227174 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap @@ -5978,12 +5978,12 @@ components: - $ref: "#/components/schemas/ActorTrace" - type: "null" IpldOps: - description: "See " + description: "See " type: array items: $ref: "#/components/schemas/TraceIpld" Logs: - description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " + description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " type: array items: type: string @@ -6926,7 +6926,7 @@ components: ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" GenesisTimestamp: - description: "See " + description: "See " type: integer format: uint64 minimum: 0 @@ -7284,7 +7284,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: - description: "See " + description: "See " type: string BlockDelay: type: integer diff --git a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap index ef444efbbcbb..5dbeaec4efb7 100644 --- a/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap +++ b/src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap @@ -6097,12 +6097,12 @@ components: - $ref: "#/components/schemas/ActorTrace" - type: "null" IpldOps: - description: "See " + description: "See " type: array items: $ref: "#/components/schemas/TraceIpld" Logs: - description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " + description: "FVM invocation logs (not EVM actor / `eth_getLogs` event logs).\nSee " type: array items: type: string @@ -7142,7 +7142,7 @@ components: ForkUpgradeParams: $ref: "#/components/schemas/ForkUpgradeParams" GenesisTimestamp: - description: "See " + description: "See " type: integer format: uint64 minimum: 0 @@ -7520,7 +7520,7 @@ components: APIVersion: $ref: "#/components/schemas/ShiftingVersion" Agent: - description: "See " + description: "See " type: string BlockDelay: type: integer