Skip to content

Conversation

@gzliudan
Copy link
Collaborator

Proposed changes

This PR eliminates the following errors which are produced by PR #1850:

ERROR[12-23|23:05:41.035] [VerifyVoteMessage] Fail to get epochInfo when verifying vote message! blockNum=76,854,127 blockHash=147610..416730 voteHash=4d0a5c..9e7fcf voteGapNumber=76,852,350 err="[getEpochSwitchInfo] can not find header from db hash 0x147610f021c9b4b5fda55239a807181c52c864a3b25d02ba0b9785105a416730"
ERROR[12-23|23:05:41.035] [Vote] Verify BFT Vote                   error="[getEpochSwitchInfo] can not find header from db hash 0x147610f021c9b4b5fda55239a807181c52c864a3b25d02ba0b9785105a416730"

ERROR[12-23|23:05:43.380] [VerifyVoteMessage] Fail to get epochInfo when verifying vote message! blockNum=76,854,128 blockHash=6eaf17..9feb10 voteHash=54c559..dafbde voteGapNumber=76,852,350 err="[getEpochSwitchInfo] can not find header from db hash 0x6eaf1777cab5f487090909afd5eabf15dd103413a833a305b1b8970d349feb10"
ERROR[12-23|23:05:43.380] [Vote] Verify BFT Vote                   error="[getEpochSwitchInfo] can not find header from db hash 0x6eaf1777cab5f487090909afd5eabf15dd103413a833a305b1b8970d349feb10"

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Regular KTLO or any of the maintaince work. e.g code style
  • CICD Improvement

Impacted Components

Which part of the codebase this PR will touch base on,

Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…inFinOrg#1850

Previously, vote verification would log errors and fail when the referenced block header was not yet available locally, especially when nodes in the same round processed votes before receiving the block header. This commit changes the logic to defer verification and log at debug level if the header is missing, preventing unnecessary error logs and aligning with upstream geth behavior for out-of-order message arrival during consensus voting.
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.

3 participants