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

Calibnet Support #1370

Merged
merged 22 commits into from
Feb 28, 2022
Merged

Calibnet Support #1370

merged 22 commits into from
Feb 28, 2022

Conversation

connormullett
Copy link
Contributor

@connormullett connormullett commented Jan 12, 2022

Summary of changes
Changes introduced in this pull request:

  • Add support for calibration net

Reference issue to close (if applicable)

Closes #1320

Other information and links

to build: make calibnet
calibnet snapshot can be made from lotus
Should fail after nv15 as changes are not introduced for the upgrade here

@connormullett connormullett changed the title Connor/calibnet Calibnet Support Jan 18, 2022
types/networks/src/calibnet/mod.rs Outdated Show resolved Hide resolved
types/networks/src/calibnet/mod.rs Outdated Show resolved Hide resolved
forest/Cargo.toml Outdated Show resolved Hide resolved
@connormullett connormullett marked this pull request as ready for review January 18, 2022 20:44
types/networks/Cargo.toml Outdated Show resolved Hide resolved
@q9f
Copy link
Contributor

q9f commented Feb 11, 2022

Is Calibnet ready to go? Could you rebase on main?

@elmattic
Copy link
Contributor

Is Calibnet ready to go? Could you rebase on main?

No it's not. There are still some sync issues.

@elmattic
Copy link
Contributor

elmattic commented Feb 15, 2022

Hey @ec2 helping @connormullett with this sync issue and would like to know if you have some idea why this is failing.

Basically everything looks good during the block validation (height 636,822) after importing the snapshot except one call that internally failed.

The offending callstack goes like this:

let hp = v_state_manager.eligible_to_mine(

let hmp = self.miner_has_min_power(address, lookback_tipset)?;

.get_actor(actor::power::ADDRESS, ts.parent_state())?

let state = StateTree::new_from_root(self.blockstore(), state_cid)?;

let hamt = Map::load(&actors, store, version.into())?;
(Fallbacking to v0 state tree since retrieval failed)

ActorVersion::V0 => Ok(Map::V0(actorv0::make_map_with_root(cid, store)?)),

...

None => Err(Error::CidNotFound(cid.to_string())),

To sum up it seems to me that reading using the Cid bafy2bzacec4xpti63qilepxw4ofgbt7pdduumnvufaom53sfrkz5xdcslfxdk from the blockstore just returns a None and bubbles up to an error, later resulting in the log warning:

2022-02-15T11:38:30.664Z WARN chain_sync::tipset_syncer > Validating block [CID = bafy2bzacecnamj6hoxdsbdlkxs6fmug4nyndug2rubetymli6dkyf755gqeqg] in EPOCH = 636822 failed: Validation error: StateManager error: Cid (bafy2bzacec4xpti63qilepxw4ofgbt7pdduumnvufaom53sfrkz5xdcslfxdk) did not match any in database

Any ideas where this could come from or on how to continue debugging this? Thanks :)

@q9f
Copy link
Contributor

q9f commented Feb 17, 2022

linter fails on #1438

@connormullett
Copy link
Contributor Author

Everything is g2g now. Should not sync past nv15 but doesn't panic

@@ -389,10 +389,11 @@ where
let deleted = child_node.rm_value(hashed_key, bit_width, depth + 1, key, store)?;
if deleted.is_some() {
*child = Pointer::Dirty(std::mem::take(child_node));

// Clean to retrieve canonical form
child.clean()?;
Copy link
Member

Choose a reason for hiding this comment

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

Should this be backported to ref-fvm? If I understand correctly, they have the same issue on their side so calibnet can't work with any implementation using ref-fvm, right? https://github.com/filecoin-project/ref-fvm/blob/lemmih/forest/ipld/hamt/src/node.rs#L396

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I'm going to say yes. I'll open a PR on their side with the same fix and see what they say

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

worked for me! great work :D

@connormullett connormullett merged commit b4b38bd into main Feb 28, 2022
@connormullett connormullett deleted the connor/calibnet branch February 28, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for calibration network
6 participants