heroImg

Fixing Conflicts | Züs Weekly Debrief (September 21, 2022)

Clarke McMakin
October 31, 2022
News & Updates

Happy Wednesday! Last week the dev team finally merged the state hash mismatch PR 1594 into staging. The next step will be merging the batch-update branch and fixing conflicts and any possible issues. Meanwhile, the team closed 12 PRs and 15 related issues in the Züs repo.

Blockchain Team

Fixing Conflicts

The team changed the Allocation. Terms from string to []AllocationBlobberTerm and associated it with the AllocationBlobberTerms table. The terms store all the blobbers terms info that is linked to the allocation. Previously, when updating the allocation, the team would encode all the terms into a json string first, and then update to the event database. This was a bad design, as the terms data would already be saved to the database. Updates like this help with fixing conflicts.

The previous method made it impossible to ignore the terms update because UpdateAllocation would always try to update the data to its latest version. Now it is not necessary to update the terms every time. Although the team has optimized a lot of places to avoid using UpdateAllocation events, there are still places that cannot be avoided. After changing it to []AllocationBlobberTerm the field will just be ignored by default when not setting the data for updating, and it is not necessary to use json encode/decode anymore. Check for details here.

Furthermore, the team implemented hooks/triggers for updating allocation and blobber challenge stats instead of emitting UpdateAllocation events to update all of the stats data or emitting separate events to update the allocation and blobber. Therefore, the hooks will update the challenge each time when adding a new challenge or updating challenges to the database. Moreover, they added separate events to update allocation staked fields instead of emitting UpdateAllocation to update all allocations. Also, they detected and removed a place that was emitting events on every round to update miners’ settings by overwriting. This place was wasting resources while changing nothing to the miner itself.

Stake Pool Optimization

In addition, they optimized to update stake pool total offers only when it has changed. Previously, the stake pool total offers would be updated every time when interacting with the stake pool. However, the total offers would only change in specific cases, while the stake pool would change every round several times with each interaction. Moreover, they merged allocation blobber terms’ update events. Also, the team merged the allocation stake data update events. Merged this PR and all associated PRs in other repos. Resolved conflicts while merging the latest changes from staging, and resolved several issues while processing the merges.

Fixed swagger error caused by the incompatible gofmt of go 1.19 and the go swagger. The gofmt will rearrange the swagger router comments. Fixed associated system test errors in PR. Solved miner/sharder stake pool pending status, which caused a test failure. Implemented the helper function waitStakePoolActive to wait for config.RewardRoundFrequency rounds before staking the pool again. Fixed SAS balance regex error. Removed pool_id params.

Merges and Changes

Merged associated gosdk to use client id as pool id. Merged associated zboxcli to update gosdk and remove pool id. Also Merged associated zwalletcli to update gosdk and remove pool id.

Changed mocks from common repo instead of calling script to generate on running the tests on github actions. Implemented allocation cancellation charge. Fixed with check zcnsc signature thresholdFixed leftover changes required on verifying the zcnsc signatures and threshold. Solved blank page on diagnostic page for smart contract handlers. Removed the info field from the storage node, which will be stored in the zbox server instead of Züs network. Fixed with misc endpoint changes for block rewards system tests. Added field to identify if a block is finalized or not. Closed PR by including operation in writeMaker.

Lot’s of progress and as we continue fixing conflicts movement should accelerate. With current merges and fixes, the team expects a decrease in the rate of opening issues, while closing more issues.

About Züs

Züs is a high-performance storage platform that powers limitless applications. It’s a new way to earn passive income from storage.

Latest Articles
Lori Bowers
March 29, 2024

Enterprises are constantly seeking ways to enhance the performance of our AI applications while keeping costs low. With the rise of data lakes as a key component of modern enterprises, finding a solution that offers high performance for faster AI processing at minimal cost is crucial. This is where Züs comes in, offering not only […]