Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: TukTuk 2k network #4872

Merged
merged 1 commit into from
Oct 10, 2024
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
7 changes: 4 additions & 3 deletions scripts/devnet/.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
LOTUS_IMAGE=ghcr.io/chainsafe/lotus-devnet:2024-10-07-6d79e1d
LOTUS_IMAGE=ghcr.io/chainsafe/lotus-devnet:2024-10-10-600728e
FOREST_DATA_DIR=/forest_data
LOTUS_DATA_DIR=/lotus_data
FIL_PROOFS_PARAMETER_CACHE=/var/tmp/filecoin-proof-parameters
MINER_ACTOR_ADDRESS=t01000
MINER_ACTOR_ADDRESS=f01000
LOTUS_RPC_PORT=1234
LOTUS_P2P_PORT=1235
MINER_RPC_PORT=2345
Expand All @@ -18,4 +18,5 @@ THUNDER_HEIGHT=6
WATERMELON_HEIGHT=9
DRAGON_HEIGHT=12
WAFFLE_HEIGHT=18
TARGET_HEIGHT=20
TUKTUK_HEIGHT=20
TARGET_HEIGHT=22
5 changes: 5 additions & 0 deletions scripts/devnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ services:
- LOTUS_DRAGON_HEIGHT=${DRAGON_HEIGHT}
- LOTUS_GENESIS_NETWORK_VERSION=${GENESIS_NETWORK_VERSION}
- LOTUS_WAFFLE_HEIGHT=${WAFFLE_HEIGHT}
- LOTUS_TUKTUK_HEIGHT=${TUKTUK_HEIGHT}
ports:
- ${LOTUS_RPC_PORT}:${LOTUS_RPC_PORT}
- ${LOTUS_P2P_PORT}:${LOTUS_P2P_PORT}
Expand Down Expand Up @@ -109,6 +110,7 @@ services:
- LOTUS_DRAGON_HEIGHT=${DRAGON_HEIGHT}
- LOTUS_GENESIS_NETWORK_VERSION=${GENESIS_NETWORK_VERSION}
- LOTUS_WAFFLE_HEIGHT=${WAFFLE_HEIGHT}
- LOTUS_TUKTUK_HEIGHT=${TUKTUK_HEIGHT}
ports:
- ${MINER_RPC_PORT}:${MINER_RPC_PORT}
env_file:
Expand Down Expand Up @@ -144,6 +146,7 @@ services:
- LOTUS_DRAGON_HEIGHT=${DRAGON_HEIGHT}
- LOTUS_GENESIS_NETWORK_VERSION=${GENESIS_NETWORK_VERSION}
- LOTUS_WAFFLE_HEIGHT=${WAFFLE_HEIGHT}
- LOTUS_TUKTUK_HEIGHT=${TUKTUK_HEIGHT}
entrypoint: ["/bin/bash", "-c" ]
env_file:
- lotus.env
Expand Down Expand Up @@ -189,6 +192,7 @@ services:
- FOREST_WATERMELON_HEIGHT=${WATERMELON_HEIGHT}
- FOREST_DRAGON_HEIGHT=${DRAGON_HEIGHT}
- FOREST_WAFFLE_HEIGHT=${WAFFLE_HEIGHT}
- FOREST_TUKTUK_HEIGHT=${TUKTUK_HEIGHT}
networks:
- devnet
ports:
Expand Down Expand Up @@ -235,6 +239,7 @@ services:
- FOREST_WATERMELON_HEIGHT=${WATERMELON_HEIGHT}
- FOREST_DRAGON_HEIGHT=${DRAGON_HEIGHT}
- FOREST_WAFFLE_HEIGHT=${WAFFLE_HEIGHT}
- FOREST_TUKTUK_HEIGHT=${TUKTUK_HEIGHT}
networks:
- devnet
ports:
Expand Down
2 changes: 1 addition & 1 deletion scripts/devnet/lotus.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --profile mini

ENV PATH="/root/.cargo/bin:${PATH}"

RUN git clone --depth 1 --branch v1.29.2 https://github.com/filecoin-project/lotus.git .
RUN git clone --depth 1 --branch v1.30.0-rc1 https://github.com/filecoin-project/lotus.git .

# https://github.com/Filecoin-project/filecoin-ffi?tab=readme-ov-file#building-from-source
RUN CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" \
Expand Down
3 changes: 2 additions & 1 deletion src/networks/devnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ pub static HEIGHT_INFOS: Lazy<HashMap<Height, HeightInfo>> = Lazy::new(|| {
),
make_height!(
TukTuk,
get_upgrade_height_from_env("FOREST_TUKTUK_HEIGHT").unwrap_or(9999999999)
get_upgrade_height_from_env("FOREST_TUKTUK_HEIGHT").unwrap_or(9999999999),
get_bundle_cid("v15.0.0-rc1")
),
])
});
Expand Down
30 changes: 18 additions & 12 deletions src/shim/actors/state_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ macro_rules! actor_state_load_impl {
};
}

actor_state_load_impl!(Account, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Cron, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(DataCap, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(EVM, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Init, 0, V0, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Market, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Miner, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Multisig, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Power, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(System, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Verifreg, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Reward, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14);
actor_state_load_impl!(Account, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
Copy link
Member Author

Choose a reason for hiding this comment

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

I should probably write another macro here in the future!

actor_state_load_impl!(Cron, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(DataCap, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(EVM, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(
Init, 0, V0, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15
);
actor_state_load_impl!(Market, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(Miner, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(
Multisig, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15
);
actor_state_load_impl!(Power, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(System, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
actor_state_load_impl!(
Verifreg, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15
);
actor_state_load_impl!(Reward, 8, V8, 9, V9, 10, V10, 11, V11, 12, V12, 13, V13, 14, V14, 15, V15);
3 changes: 1 addition & 2 deletions src/state_migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ where
(Height::Watermelon, nv21::run_migration::<DB>),
(Height::Dragon, nv22::run_migration::<DB>),
(Height::Waffle, nv23::run_migration::<DB>),
// TODO(forest): https://github.com/ChainSafe/forest/issues/4802
// (Height::TukTuk, nv24::run_migration::<DB>),
(Height::TukTuk, nv24::run_migration::<DB>),
]
}
};
Expand Down
5 changes: 1 addition & 4 deletions src/state_migration/nv24/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ mod power;

/// Run migration for `NV24`. This should be the only exported method in this
/// module.
#[allow(unused_imports)]
pub use migration::run_migration;

use crate::{define_system_states, impl_system, impl_verifier};

define_system_states!(
fil_actor_system_state::v14::State,
// TODO(forest): https://github.com/ChainSafe/forest/issues/4804
// This should point to the new state type, e.g., `fil_actor_system_state::v15::State`
fil_actor_system_state::v14::State
fil_actor_system_state::v15::State
);

impl_system!();
Expand Down
Loading