0Chain Weekly Debrief — October 5, 2022

Tiago Souza
Zus Network

--

Happy Wednesday everyone! Last week the team continued working on improving the block finalization issue, reviewing the code, and closing several issues and PRs.

Blockchain Team

Improved the logic of the processing of events. The previous logic was inefficient, as it would not wait for the events of a block to be processed before marking it as finalized. This change is relevant to ensure all the data of the block is processed before the block is finalized. After the fix, the “finality stats (start to finish)” in load tests improved substantially, and is now much more stable. With the concurrency and TPS of 800, the finality is always under 2.3 seconds, while previously, it could go beyond 10 seconds. Furthermore, the team fixed some errors and incorrect tags caused after the merging of the latest code from staging. Also, they removed the hooks on updating allocation and blobbers based on the changes from challenges, which now will emit separate events for improved performance after merging. Moreover, the team improved the slow stake pool reward events processing. Although the process has already been substantially improved, it continued to be slow as the number of miners/sharders increased. However, this process was optimized by rewarding limited N stake pools in total among the miners/sharders randomly.

All of the changes above can be tracked in this new PR, which will be merged as soon as fixing some unit and system tests errors. Beyond these fixes, some core PRs were closed in the 0chain repo:

Fixed the delete authorizer issue by adding the id to the request payload. Fix on take miners from MPT and pass it as parameter to verifyMinerState function to avoid unnecessary redundant MPT access. Added code to validate the authorizer registration process. Should only the SC owner be allowed to add new authorizers. Validated transaction’s client nonce when it is submitted to report error of invalid nounce early. Previously, users would have to wait for timeout to know that the transaction is invalid.

In addition, fixed the msg pack code checking does not work issue. Updated to use magic block with 1 sharder to do conductor blobber tests. Added switches to verbosity and profiling. Refactored the cost settings code in storagesc and minersc. Fixed the cost overflow issue. Removed invalid transactions on block finalization. Transactions with past nonce will be cleaned up from the transactions pool. Refactored to remove dead code.

Core PRs closed in gosdk & blobber repos:

Added url param to the authorizer request struct. Added sdk to delete authorizer. Fixed read pool depletion issue. Cleaned up the unused commit feature and related code. Improved delete performance. Improved copy performance. Fixed wrong URL used to get blobbers ids. Fixed json issue on parsing bancor API response. Improved wasm performance. Added merkle root verification when a commit request is made.

Hope you enjoyed the update, a lot has been merged this past week! As the team anticipates closing the two main issues (block finalization and DDOS), they will shift the focus for the remaining, but mostly trivial issues, on the 0chain repo.

Developer Resources

  • Interested in learning more about building on 0Chain or becoming a service provider? Check out our GitHub for access to repositories. Community ambassador Sculptex has created numerous tutorials to help get you started.
  • Try our BetaNet here! Users can create wallets and allocations, store files, send transactions, and share files.
  • Need help navigating creating wallets, allocations, or joining as a blobber? Check out our documentation page.
  • 0Chain’s API endpoints use simple and intuitive HTTP requests to interact with the blockchain in order to send/retrieve information to and from miners, sharders or blobbers in the active network.

About 0Chain

0Chain is a high-performance decentralized storage network designed to eliminate business threats such as censorship, privacy liability and data breaches. 0Chain helps entities achieve GDPR compliance, localization and tokenization, and monetizes private data sharing.

API| Docs | Telegram | Reddit | Twitter | Forum | GitHub

--

--