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
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fil_actor_account_state = { version = "23" }
fil_actor_cron_state = { version = "23" }
fil_actor_datacap_state = { version = "23" }
fil_actor_eam_state = { version = "23" }
fil_actor_ethaccount_state = { version = "23" }
Copy link
Copy Markdown
Contributor

@hanabi1224 hanabi1224 Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you create an issue to track updating https://github.com/ChainSafe/fil-actor-states/blob/main/Makefile#L55 in fil-actor-states for fil_actor_ethaccount_state crate?

fil_actor_evm_state = { version = "23" }
fil_actor_init_state = { version = "23" }
fil_actor_market_state = { version = "23" }
Expand Down
28 changes: 28 additions & 0 deletions src/rpc/registry/actors/eth_account.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2019-2025 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use crate::rpc::registry::methods_reg::{MethodRegistry, register_actor_methods};
use crate::shim::message::MethodNum;
use cid::Cid;

macro_rules! register_eth_account_reg_version {
($registry:expr, $code_cid:expr, $state_version:path) => {{
use $state_version::*;

// Constructor has no parameters
register_actor_methods!($registry, $code_cid, [(Method::Constructor, empty),]);
}};
}

pub(crate) fn register_actor_methods(registry: &mut MethodRegistry, cid: Cid, version: u64) {
match version {
10 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v10),
11 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v11),
12 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v12),
13 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v13),
14 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v14),
15 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v15),
16 => register_eth_account_reg_version!(registry, cid, fil_actor_ethaccount_state::v16),
_ => {}
}
}
1 change: 1 addition & 0 deletions src/rpc/registry/actors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pub(crate) mod account;
pub(crate) mod cron;
pub(crate) mod datacap;
pub(crate) mod eth_account;
pub(crate) mod evm;
pub(crate) mod init;
pub(crate) mod miner;
Expand Down
4 changes: 3 additions & 1 deletion src/rpc/registry/methods_reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ impl MethodRegistry {

fn register_known_methods(&mut self) {
use crate::rpc::registry::actors::{
account, cron, datacap, evm, init, miner, multisig, power, reward, system, verified_reg,
account, cron, datacap, eth_account, evm, init, miner, multisig, power, reward, system,
verified_reg,
};

for (&cid, &(actor_type, version)) in ACTOR_REGISTRY.iter() {
Expand All @@ -96,6 +97,7 @@ impl MethodRegistry {
BuiltinActor::VerifiedRegistry => {
verified_reg::register_actor_methods(self, cid, version)
}
BuiltinActor::EthAccount => eth_account::register_actor_methods(self, cid, version),
_ => {}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/tool/subcommands/api_cmd/api_compare_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,13 @@ fn state_decode_params_api_tests(tipset: &Tipset) -> anyhow::Result<Vec<RpcTest>
vec![],
tipset.key().into(),
))?),
RpcTest::identity(StateDecodeParams::request((
Address::new_delegated(Address::ETHEREUM_ACCOUNT_MANAGER_ACTOR.id()?, &[0; 20])
.unwrap(),
fil_actor_ethaccount_state::v16::Method::Constructor as u64,
vec![],
tipset.key().into(),
))?),
];

tests.extend(miner_actor_state_decode_params_tests(tipset)?);
Expand Down
1 change: 1 addition & 0 deletions src/tool/subcommands/api_cmd/test_snapshots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ filecoin_verified_reg_statedecodeparams_1754401651147022.rpcsnap.json.zst
filecoin_verified_reg_statedecodeparams_1754401651147091.rpcsnap.json.zst
filecoin_verified_reg_statedecodeparams_1754401651147157.rpcsnap.json.zst
filecoin_verified_reg_statedecodeparams_1754401651147231.rpcsnap.json.zst
filecoin_ethaccount_statedecodeparams_1756186350854913.rpcsnap.json.zst
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Add EthAccount state_decodeparams snapshot — looks good

The new snapshot file entry is correctly appended next to other state_decodeparams snapshots and before statereplay. No issues spotted.

If helpful, verify that the referenced snapshot file exists in the repo:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
fd -a --exact-depth 1 'filecoin_ethaccount_statedecodeparams_*.rpcsnap.json.zst' src/tool/subcommands/api_cmd

Length of output: 131


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Search the entire repository for the new EthAccount state_decodeparams snapshot file
fd --type f 'filecoin_ethaccount_statedecodeparams_.*\.rpcsnap\.json\.zst'

Length of output: 96


Missing Snapshot File Reference
The test snapshot list references filecoin_ethaccount_statedecodeparams_1756186350854913.rpcsnap.json.zst, but I was unable to locate this file anywhere in the repository. Please ensure that the new snapshot file is added under src/tool/subcommands/api_cmd/ (or the appropriate snapshots directory) before approving this change.

• Affected location:

  • src/tool/subcommands/api_cmd/test_snapshots.txt (line 204)

Action required:

  • Add the actual filecoin_ethaccount_statedecodeparams_1756186350854913.rpcsnap.json.zst snapshot file to the repository so that the test can locate it.
  • Re-run the snapshot discovery (e.g., fd -a --exact-depth 1 'filecoin_ethaccount_statedecodeparams_*.rpcsnap.json.zst' src/tool/subcommands/api_cmd) to confirm its presence before merging.
🤖 Prompt for AI Agents
In src/tool/subcommands/api_cmd/test_snapshots.txt around line 204, the snapshot
list references
filecoin_ethaccount_statedecodeparams_1756186350854913.rpcsnap.json.zst which is
missing from the repo; add the actual snapshot file under
src/tool/subcommands/api_cmd/ (or the designated snapshots directory) with that
exact filename, commit it, and re-run snapshot discovery (e.g., fd -a
--exact-depth 1 'filecoin_ethaccount_statedecodeparams_*.rpcsnap.json.zst'
src/tool/subcommands/api_cmd) to verify the file is present before merging.

filecoin_statereplay_1743504051038215.rpcsnap.json.zst
filecoin_statesearchmsg_1741784596636715.rpcsnap.json.zst
filecoin_statesearchmsglimited_1741784596704876.rpcsnap.json.zst
Expand Down
Loading