This week, we mainly improved the consensus mechanism and storage subnet of the Contatract mainnet. In addition to stress testing, we also use the DApp front-end to test mainnet, such as uploading and downloading speeds, uploading and downloading large files, and some functions that were not previously considered carefully. This test conducted a thorough investigation, and then the more important work may be to optimize the pricing mechanism of the space and simulate various possible attacks. Testing is not easy, but the security of the blockchain is the most critical. The blockchain involves a large number of tokens. Once a problem occurs, the consequences are unthinkable. Therefore, the test cannot be overemphasized.
Contatract's PBFT consensus mechanism:
- Fixed the problem that in the PBFT consensus, the block cannot be generated occasionally due to inconsistent view numbers;
- Fixed the issue of long-term soft fork of the chain in the PBFT consensus due to the occasional inconsistency of PBFT information in the block;
- Fixed the problem that the PBFT consensus cannot continue to generate blocks because the PBFT phase information cannot be reset correctly;
- Fixed the issue that the multi-coroutine could not exit correctly when the PBFT consensus was generated, which caused a crash.
Contatract's storage subnet (Elephant network):
- Fixed the problem that when the agent server is reading and writing large files, the front-end connection cannot be blocked because the threads are blocked due to reading and writing files;
- Fixed the problem that the front end can no longer read or write files due to problems with the exception handling code after uploading or downloading files failed;
- Added the function of splitting files into multiple packages for uploading or downloading. After a package fails, it will try uploading or downloading again.
- Speeded up uploading or downloading by tracking other node information when uploading or downloading files;
- Fixed the problem that when multiple threads read and write at the same time, because the file has been written and opened, reading, writing or opening again will fail.