Skip to content

Commit

Permalink
new bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Mar 7, 2024
1 parent b1130ac commit cf53246
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 87 deletions.
104 changes: 42 additions & 62 deletions Cargo.lock

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

25 changes: 13 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ dialoguer = "0.11"
digest = "0.10.5"
directories = "5"
ethereum-types = "0.14.1"
fil_actor_account_state = { version = "10.0.0-dev.2" }
fil_actor_cron_state = { version = "10.0.0-dev.2" }
fil_actor_datacap_state = { version = "10.0.0-dev.2" }
fil_actor_init_state = { version = "10.0.0-dev.2" }
fil_actor_interface = { version = "10.0.0-dev.2" }
fil_actor_market_state = { version = "10.0.0-dev.2" }
fil_actor_miner_state = { version = "10.0.0-dev.2" }
fil_actor_power_state = { version = "10.0.0-dev.2" }
fil_actor_reward_state = { version = "10.0.0-dev.2" }
fil_actor_system_state = { version = "10.0.0-dev.2" }
fil_actor_verifreg_state = { version = "10.0.0-dev.2" }
fil_actors_shared = { version = "10.0.0-dev.2", features = ["json"] }
frc46_token = "10.0.0"
fil_actor_account_state = { version = "10.0.0-dev.4" }
fil_actor_cron_state = { version = "10.0.0-dev.4" }
fil_actor_datacap_state = { version = "10.0.0-dev.4" }
fil_actor_init_state = { version = "10.0.0-dev.4" }
fil_actor_interface = { version = "10.0.0-dev.4" }
fil_actor_market_state = { version = "10.0.0-dev.4" }
fil_actor_miner_state = { version = "10.0.0-dev.4" }
fil_actor_power_state = { version = "10.0.0-dev.4" }
fil_actor_reward_state = { version = "10.0.0-dev.4" }
fil_actor_system_state = { version = "10.0.0-dev.4" }
fil_actor_verifreg_state = { version = "10.0.0-dev.4" }
fil_actors_shared = { version = "10.0.0-dev.4", features = ["json"] }
filecoin-proofs-api = { version = "16.0", default-features = false }
flume = "0.11"
fs_extra = "1.2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/devnet/lotus.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y ca-certificates build-essential clang o

WORKDIR /lotus

RUN git clone --depth 1 --branch asr/migration-nv22 https://github.com/filecoin-project/lotus.git .
RUN git clone --depth 1 --branch release/v1.26.0 https://github.com/filecoin-project/lotus.git .

RUN CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" \
CGO_CFLAGS="-D__BLST_PORTABLE__" \
Expand Down
2 changes: 1 addition & 1 deletion src/networks/actors_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub static ACTOR_BUNDLES: Lazy<Box<[ActorBundleInfo]>> = Lazy::new(|| {
"bafy2bzacebzz376j5kizfck56366kdz5aut6ktqrvqbi3efa2d4l2o2m653ts" @ "v10.0.0" for "devnet",
"bafy2bzaceay35go4xbjb45km6o46e5bib3bi46panhovcbedrynzwmm3drr4i" @ "v11.0.0" for "devnet",
"bafy2bzaceasjdukhhyjbegpli247vbf5h64f7uvxhhebdihuqsj2mwisdwa6o" @ "v12.0.0" for "devnet",
"bafy2bzacedok4fxofxdwkv42whkkukf3g4jwevui4kk5bw7b5unx4t3tjlrya" @ "v13.0.0-rc.2" for "devnet",
"bafy2bzaceap34qfq4emg4fp3xd7bxtzt7pvkaj37kunqm2ccvttchtlljw7d4" @ "v13.0.0-rc.3" for "devnet",
"bafy2bzaceb6j6666h36xnhksu3ww4kxb6e25niayfgkdnifaqi6m6ooc66i6i" @ "v9.0.3" for "mainnet",
"bafy2bzacecsuyf7mmvrhkx2evng5gnz5canlnz2fdlzu2lvcgptiq2pzuovos" @ "v10.0.0" for "mainnet",
"bafy2bzacecnhaiwcrpyjvzl4uv4q3jzoif26okl3m66q3cijp3dfwlcxwztwo" @ "v11.0.0" for "mainnet",
Expand Down
2 changes: 1 addition & 1 deletion src/networks/devnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub static HEIGHT_INFOS: Lazy<HashMap<Height, HeightInfo>> = Lazy::new(|| {
HeightInfo {
epoch: get_upgrade_height_from_env("FOREST_DRAGON_HEIGHT").unwrap_or(20),
bundle: Some(
Cid::try_from("bafy2bzacedok4fxofxdwkv42whkkukf3g4jwevui4kk5bw7b5unx4t3tjlrya")
Cid::try_from("bafy2bzaceap34qfq4emg4fp3xd7bxtzt7pvkaj37kunqm2ccvttchtlljw7d4")
.unwrap(),
),
},
Expand Down
4 changes: 2 additions & 2 deletions src/state_migration/nv17/datacap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::state_migration::common::PostMigrator;
use crate::utils::db::CborStoreExt;
use cid::Cid;
use fil_actors_shared::fvm_ipld_hamt::BytesKey;
use frc46_token::token::state::TokenState;
use fvm_ipld_blockstore::Blockstore;
use num_traits::Zero;
use once_cell::sync::Lazy;
Expand Down Expand Up @@ -73,8 +74,7 @@ impl<BS: Blockstore> PostMigrator<BS> for DataCapPostMigrator {
verifreg_balance.into(),
)?;

let mut token =
fil_actors_shared::frc46_token::TokenState::new_with_bit_width(&store, HAMT_BIT_WIDTH)?;
let mut token = TokenState::new(store)?;
token.supply = TokenAmount::from_atto(token_supply).into();
token.balances = balances_map.flush()?;
token.allowances = allowances_map.flush()?;
Expand Down
14 changes: 6 additions & 8 deletions src/state_migration/nv22/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ impl<BS: Blockstore> StateMigration<BS> {
store: &Arc<BS>,
state: &Cid,
new_manifest: &BuiltinActorManifest,
_chain_config: &ChainConfig,
chain_config: &ChainConfig,
) -> anyhow::Result<()> {
// TODO: Use the correct epoch for the upgrade once it's fixed in Lotus
//let upgrade_epoch = chain_config
// .height_infos
// .get(&Height::Dragon)
// .context("no height info for network version NV22")?
// .epoch;
let upgrade_epoch = 3654004;
let upgrade_epoch = chain_config
.height_infos
.get(&Height::Dragon)
.context("no height info for network version NV22")?
.epoch;

let state_tree = StateTree::new_from_root(store.clone(), state)?;
let system_actor = state_tree
Expand Down

0 comments on commit cf53246

Please sign in to comment.