0Chain Weekly Debrief — September 7, 2022
Happy Wednesday! Last week the dev team focused on fixing the 0Chain block finality variation issue by merging events across transactions in the same block, instead of performing bulk update events in the same transactions, as previously mentioned. Meanwhile, the growing team is continiously fixing the blobbers rate limit and upload issues that occur when performing DDOS tests while supporting the frontend teams for both gosdk, wasm APIs, and blobbers bugs. In the following weeks, the team will start closing trivial issues and work on load tests to ensure network stability.
Sculptex’s Corner: Block Explorer
This week Sculptex released an independent version of a Block Explorer that he has been working on. This is a 3rd party implementation of a Block Explorer for 0Chain, similar to etherscan/polygonscan. Check his demo in action here.
According to Sculptex, the current default explorer deployed with 0Chain networks has been neglected due to rebranding and restructuring to be launched in the near future. He explained that just like other blockchain projects, the default explorer allows users to peruse blockchain activities. However, the explorer was extended to also perform many wallet and storage functions. Since these functions were generally run via a proxy layer, they are not ideal for security. Although the team has been updating the explorer tools with a wasm layer for increased security, Sculptex decided in the meantime to fill the void of a functional explorer for 0Chain. In addition, he recently added some specific ZCN-related functionality including the ability to browse network nodes and check Smart Contract activity.
“Writing this explorer has really helped me understand the way our Miners, Sharders and Blobbers interact with each other (via Smart Contracts). It’s particularly cool to perform a task via command line and browse its interaction on the blockchain within a few seconds! If there is sufficient interest, I’ll try and polish it up and release it on GitHub” — Sculptex.
Blockchain Team
The blockchain team added batch updates for events for adding users, adding transactions, updating blobber total stakes, and updating blobber total offers. Moreover, they refactored to simplify the provider rewards updating, and refactored to change the blobbers table to have the same rewards and total_reward fields as other providers so that it can be reused for code for updating.
Furthermore, they added an event merger to abstract the merge process. The idea was to facilitate and simplify the merging of new events when needed. Previously, the team had to declare a map for each event type to ensure uniqueness. They now support different kinds of merge logics, which can be applied with the defined eventMergeMiddlewares.
In addition, they implemented an event merger for stake pool rewards. It splits the reward and penalty into different maps to simplify the process, aggregate all of the provider rewards, delegate reward pools and penalty pools in a block. They discovered that the stake pool save method would emit a stake pool total offers increase event. However, the stake pool is hard-coded to update blobbers delegation pools. Since this method is also called by validators, it would cause the event saving to fail. As a response, the team did a workaround fix but will do a common fix later. Finally, there are further bugs on merging the events that need fixings, you can check the progress here.
Beyond the events merge commits, the dev team closed the following PRs:
- Added challenge pool tables and emitted the associated event.
- Removed the /v1/chain/get API endpoint from sharder.
- Fixed the AddAuthorizer smart contract response structure.
- Applied the util and logging packages from https://github.com/0chain/common package.
- Integrated playlist API for wasm player to improve performance.
- Used the response with a status code of 200 when it is tied with some other status for dominant response from sharders.
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.