aionnetwork / aion

Aion Network - Java Implementation
https://theoan.com/
MIT License
337 stars 113 forks source link

The version 1.6 rejected most of blocks by submitblock method #1163

Closed zzgang closed 3 years ago

zzgang commented 3 years ago

Version: 1.6.2.5c5a608 https://github.com/aionnetwork/aion/releases/download/v1.6.2/oan-v1.6.2.5c5a608-2020-12-09.tar.bz2

we upgrade the aion from 1.5 to 1.6 ,but it rejects most of blocks. the version 1.5 works better.

AionJayT commented 3 years ago

Hi @zzgang. Can you post your kernel logs? How did you upgrade your node? Please don't overwrite file to your kernel execution root path (meaning you should create a new folder for your kernel and then migrate your config and database)

zzgang commented 3 years ago

Log is normal. I only reserve my old database dir, i use the old 1.5 config.xml file. release new binary file (https://github.com/aionnetwork/aion/releases/download/v1.6.2/oan-v1.6.2.5c5a608-2020-12-09.tar.bz2) to the root dir.

zzgang commented 3 years ago

Is it the reason? Constrain the client API block submit #1155 ?

zzgang commented 3 years ago

Log error: ERROR P2P [p2p-in]: Could not read buffer. java.io.IOException: Connection reset by peer

zzgang commented 3 years ago

when reject, no logs.

zzgang commented 3 years ago

a different error: INFO SYNC [p2p-recv-23]:

AionJayT commented 3 years ago

The block has been rejected from the return of the submitblock method because the new kernel does not allow the pool submitting the block has the same mining hash. you can look at this commit https://github.com/aionnetwork/aion/commit/eb2ed925da71a5e5bbfc1fc5d4550b83f69934fc

AionJayT commented 3 years ago

Log error: ERROR P2P [p2p-in]: Could not read buffer. java.io.IOException: Connection reset by peer

Log error: ERROR P2P [p2p-in]: Could not read buffer. java.io.IOException: Connection reset by peer

This is the message we should suppress. Not an issue.

zzgang commented 3 years ago

but my success block is less than the old version 1.5.

AionJayT commented 3 years ago

a different error: INFO SYNC [p2p-recv-23]:

This is the sync manager try to fetch a block from a peer, but the receiving block data is far from the top.

zzgang commented 3 years ago

success sumbit : INFO API [XNIO-1 task-6]: mining block submitted via api

zzgang commented 3 years ago

when fail, no logs. but the block mined is less than the old version.

AionJayT commented 3 years ago

but my success block is less than the old version 1.5.

I don't know how you submit your block (guess you are using your own customized pool). But the commit I posted is trying to prevent the kernel fall into some incorrect state. you can do your own kernel build if you think it can increase the block submit success rate to you.

zzgang commented 3 years ago

The block has been rejected from the return of the submitblock method because the new kernel does not allow the pool submitting the block has the same mining hash. you can look at this commit eb2ed92

I may submit old block mining hash, because the job getblocktemplate sometimes returns 'no mining job', So use the old job template. when submit a new mining block, it is rejected. it is not rejected directly, i will fetch the block mining hash after 1 secs, it is not connected to the blockchain.