Skip to content

Commit

Permalink
Update V16 actors (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank authored Jan 20, 2025
1 parent dafcd87 commit 53f391a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ members = [
resolver = "2"

[workspace.package]
version = "19.0.0"
version = "19.1.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ChainSafe/fil-actor-states"
authors = [
Expand Down Expand Up @@ -81,18 +81,18 @@ toml = "0.8"
uint = { version = "0.10", default-features = false }
unsigned-varint = "0.8"

fil_actor_account_state = { version = "19.0.0", path = "./actors/account" }
fil_actor_cron_state = { version = "19.0.0", path = "./actors/cron" }
fil_actor_datacap_state = { version = "19.0.0", path = "./actors/datacap" }
fil_actor_evm_state = { version = "19.0.0", path = "./actors/evm" }
fil_actor_init_state = { version = "19.0.0", path = "./actors/init" }
fil_actor_market_state = { version = "19.0.0", path = "./actors/market" }
fil_actor_miner_state = { version = "19.0.0", path = "./actors/miner" }
fil_actor_multisig_state = { version = "19.0.0", path = "./actors/multisig" }
fil_actor_power_state = { version = "19.0.0", path = "./actors/power" }
fil_actor_reward_state = { version = "19.0.0", path = "./actors/reward" }
fil_actor_system_state = { version = "19.0.0", path = "./actors/system" }
fil_actor_verifreg_state = { version = "19.0.0", path = "./actors/verifreg" }
fil_actors_shared = { version = "19.0.0", path = "./fil_actors_shared" }
fil_actor_account_state = { version = "19.1.0", path = "./actors/account" }
fil_actor_cron_state = { version = "19.1.0", path = "./actors/cron" }
fil_actor_datacap_state = { version = "19.1.0", path = "./actors/datacap" }
fil_actor_evm_state = { version = "19.1.0", path = "./actors/evm" }
fil_actor_init_state = { version = "19.1.0", path = "./actors/init" }
fil_actor_market_state = { version = "19.1.0", path = "./actors/market" }
fil_actor_miner_state = { version = "19.1.0", path = "./actors/miner" }
fil_actor_multisig_state = { version = "19.1.0", path = "./actors/multisig" }
fil_actor_power_state = { version = "19.1.0", path = "./actors/power" }
fil_actor_reward_state = { version = "19.1.0", path = "./actors/reward" }
fil_actor_system_state = { version = "19.1.0", path = "./actors/system" }
fil_actor_verifreg_state = { version = "19.1.0", path = "./actors/verifreg" }
fil_actors_shared = { version = "19.1.0", path = "./fil_actors_shared" }

fil_actors_test_utils = { path = "./fil_actors_test_utils" }
25 changes: 25 additions & 0 deletions actors/evm/src/v16/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ pub struct Tombstone {
pub nonce: u64,
}

/// A structure representing Transient Data
#[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize_tuple, Deserialize_tuple)]
pub struct TransientData {
/// The contract transient data state dictionary.
/// Transient Data State is a map of U256 -> U256 values.
/// KAMT<U256, U256>
pub transient_data_state: Cid,
/// The data representing the transient data lifespan
pub transient_data_lifespan: TransientDataLifespan,
}

/// A structure representing the transient data lifespan.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize_tuple, Deserialize_tuple)]
pub struct TransientDataLifespan {
/// The origin actor ID associated with the transient data.
pub origin: ActorID,
/// A unique nonce identifying the transaction.
pub nonce: u64,
}

/// A Keccak256 digest of EVM bytecode.
#[derive(Deserialize, Serialize, Clone, Copy, Eq, PartialEq)]
#[serde(transparent)]
Expand Down Expand Up @@ -110,6 +130,11 @@ pub struct State {
/// KAMT<U256, U256>
pub contract_state: Cid,

/// The data that containers tranisent state. The struct includes the CID of the KAMT that
/// contains the state data and the tuple of nonce and actor id that represents
/// the lifespan of the transient storage data
pub transient_data: Option<TransientData>,

/// The EVM nonce used to track how many times CREATE or CREATE2 have been called.
pub nonce: u64,

Expand Down

0 comments on commit 53f391a

Please sign in to comment.