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

latest version errors? in logs. #403

Closed
brandonm78 opened this issue Feb 9, 2024 · 2 comments · Fixed by #404
Closed

latest version errors? in logs. #403

brandonm78 opened this issue Feb 9, 2024 · 2 comments · Fixed by #404

Comments

@brandonm78
Copy link

I built the latest version (Neo 2.7.1) from the source. I am running go1.20.13 on Ubuntu 22.04.3 LTS.
I am receiving the following messages in my logs. Notice the impossible reorg error, block in the future error and that it skips the block number: 31,805,192. This is happening several times per minute.

INFO [02-09|21:26:57.162] [reorg][writeKnownBlock] current="{Number: 31895190, Hash: 0xd6767c12263a8e68b5c401a63b3d6da1eac93dfde152650f0d40e9fcb33a924b, Parent: 0x14875fe02e1eb18db8fa8cff0fdd3fa7f9392244b63604cbbab1baf41639e47a, Signer: 0x61089875fF9e506ae78C7FE9f7c388416520E386}" newBlock="{Number: 31895190, Hash: 0xd6767c12263a8e68b5c401a63b3d6da1eac93dfde152650f0d40e9fcb33a924b, Parent: 0x14875fe02e1eb18db8fa8cff0fdd3fa7f9392244b63604cbbab1baf41639e47a, Signer: 0x61089875fF9e506ae78C7FE9f7c388416520E386}"
ERROR[02-09|21:26:57.164] Impossible reorg, please file an issue oldnum=31,895,190 oldhash=d6767c..3a924b newnum=31,895,190 newhash=d6767c..3a924b
WARN [02-09|21:26:57.164] Synchronisation failed, dropping peer peer=e66dcf06945a0e15bc919b9403f6d10ff45d57d5d8887c4c218ca13997a9933b err="retrieved hash chain is invalid: block in the future"
INFO [02-09|21:26:59.859] Imported new chain segment blocks=1 txs=17 mgas=1.423 elapsed=19.326ms mgasps=73.646 number=31,895,191 hash=d04d4a..d43ccf dirty=255.75MiB
INFO [02-09|21:26:59.860] Unindexed transactions blocks=1 txs=2 tail=29,545,192 elapsed="261.261µs"
INFO [02-09|21:27:00.231] Snapshot extension registration failed peer=0e5ddf3e err="peer connected on snap without compatible eth support"
INFO [02-09|21:27:01.110] Snapshot extension registration failed peer=3c9012cf err="peer connected on snap without compatible eth support"
INFO [02-09|21:27:01.378] Deep froze chain segment blocks=20 elapsed=6.297ms number=31,805,191 hash=507d8b..4a856c
INFO [02-09|21:27:01.711] Snapshot extension registration failed peer=fc84034d err="peer connected on snap without compatible eth support"
INFO [02-09|21:27:01.812] Looking for peers peercount=5 tried=24 static=0
WARN [02-09|21:27:03.809] Synchronisation failed, dropping peer peer=e66dcf06945a0e15bc919b9403f6d10ff45d57d5d8887c4c218ca13997a9933b err=timeout
WARN [02-09|21:27:03.926] Synchronisation failed, dropping peer peer=5fdc0ddbd5efcde1fa91911c176b48ca3b3a25ae2e07850e93a4d3b2d0530a8e err="retrieved hash chain is invalid: block in the future"
INFO [02-09|21:27:03.927] Unindexed transactions blocks=1 txs=7 tail=29,545,193 elapsed="449.506µs"
WARN [02-09|21:27:03.927] Synchronisation failed, retrying err="peer is unknown or unhealthy"
INFO [02-09|21:27:04.187] Imported new chain segment blocks=1 txs=25 mgas=1.904 elapsed=33.863ms mgasps=56.233 number=31,895,193 hash=a145f4..ad6155 dirty=255.58MiB

I have tried deleting the chaindata and uploaded the latest snapshot. But it still is happening. When building from the source, all test pass and it builds clean with no errors.
I also made sure I init the genesis block before running. And also tried it using the same command line as shown on github:

ronin --http.api eth,net,web3,consortium --networkid 2020 --discovery.dns enrtree://AIGOFYDZH6BGVVALVJLRPHSOYJ434MPFVVQFXJDXHW5ZYORPTGKUI@nodes.roninchain.com --datadir /opt/ronin --port 30303 --http --http.corsdomain '' --http.addr 0.0.0.0 --http.port 8545 --http.vhosts '' --ws --ws.addr 0.0.0.0 --ws.port 8546 --ws.origins '*'

Same messages in the logs no matter how I try it with the new release.

@minh-bq
Copy link
Collaborator

minh-bq commented Feb 10, 2024

Thanks for your report.

Could you try to apply this patch and build the binary again to see if problem is resolved?

diff --git a/core/blockchain.go b/core/blockchain.go
index 3a9861850..0a2d8e85b 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1675,7 +1675,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
                )
                for block != nil && bc.skipBlock(err, it) {
                        externTd = new(big.Int).Add(externTd, block.Difficulty())
-                       if bc.reorgNeeded(current, localTd, block, externTd) {
+                       if localTd.Cmp(externTd) < 0 && bc.reorgNeeded(current, localTd, block, externTd) {
                                break
                        }
                        log.Debug("Ignoring already known block", "number", block.Number(), "hash", block.Hash())
  • Create a file name patch with the above content
  • Run git apply --3way patch
  • Build the binary

@brandonm78
Copy link
Author

brandonm78 commented Feb 10, 2024 via email

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 a pull request may close this issue.

3 participants