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

fix: block validation error at epoch 2281645 #5109

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Jan 6, 2025

Summary of changes

Changes introduced in this pull request:

  • fix logic to match Lotus
  • bump Forest version

https://github.com/filecoin-project/lotus/blob/v1.32.0-rc2/chain/vm/fvm.go#L169

	// (4) expensive final checks

	// check blocks are properly signed by their respective miner
	// note we do not need to check extra's: it is a parent to block b
	// which itself is signed, so it was willingly included by the miner
	gasA, sigErr := x.verifyBlockSig(ctx, &blockA)
	totalGas += gasA
	if sigErr != nil {
		log.Info("invalid consensus fault: cannot verify first block sig: %w", sigErr)
		return ret, totalGas
	}

	gas2, sigErr := x.verifyBlockSig(ctx, &blockB)
	totalGas += gas2
	if sigErr != nil {
		log.Info("invalid consensus fault: cannot verify second block sig: %w", sigErr)
		return ret, totalGas
	}

Reference issue to close (if applicable)

Closes #5108

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@hanabi1224 hanabi1224 marked this pull request as ready for review January 6, 2025 07:13
@hanabi1224 hanabi1224 requested a review from a team as a code owner January 6, 2025 07:13
@hanabi1224 hanabi1224 requested review from elmattic and removed request for a team January 6, 2025 07:13
@hanabi1224 hanabi1224 force-pushed the hm/fix-block-validation branch from 7e3ecf1 to 57eb7c7 Compare January 6, 2025 07:25
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 reflected in FVM2 and FVM3 as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, fixed.

@@ -4,20 +4,15 @@

verbose = "debug"
no_progress = true
exclude_path = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lint check job requires this format change

@hanabi1224 hanabi1224 force-pushed the hm/fix-block-validation branch from 1c5b93c to 261ddd4 Compare January 6, 2025 08:25
@hanabi1224 hanabi1224 enabled auto-merge January 6, 2025 08:31
@hanabi1224 hanabi1224 added this pull request to the merge queue Jan 6, 2025
Merged via the queue into main with commit 0c6707b Jan 6, 2025
35 of 36 checks passed
@hanabi1224 hanabi1224 deleted the hm/fix-block-validation branch January 6, 2025 09:29
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.

Forest node on Calibnet gets stuck at epoch 2281645
3 participants