ChainSafe / forest

🌲 Rust Filecoin Node Implementation
https://forest.chainsafe.io
Apache License 2.0
638 stars 160 forks source link

bake known checkpoints #3227

Open aatifsyed opened 1 year ago

aatifsyed commented 1 year ago

I'd like to remove the serialization for this, and turn it into rust code, probably using something like databake, but that's a little heavyweight - we could then just

struct KnownBlocks<'a> {
    calibnet: &'a [(i64, Cid)],
    mainnet: &'a [(i64, Cid)],
}
const KNOWN_BLOCKS: KnownBlocks<'static> = todo!();

~Unfortunately, multihash and cid aren't there yet:~ ~https://github.com/multiformats/rust-cid/issues/138~ ~https://github.com/multiformats/rust-multihash/issues/330~

_Originally posted by @aatifsyed in https://github.com/ChainSafe/forest/pull/3220#discussion_r1267382019_

aatifsyed commented 1 year ago

Those issues are closed as wrong, we can proceed with this, see https://github.com/multiformats/rust-multihash/pull/331#issuecomment-1660013138