published on November 04, 2024 in devlog
In this week's devlog Michi talks about upgrading gateway and a fixed performance issue.
Michi (molp)
You might remember devlog #447, where we showed this work in progress screenshot of the GTWI
command:
The command lets you specify the current and planned gateway parameters for capacity, volume and distance upgrades. A gateway will work without any upgrades, but they allow boosting certain gateway properties.
I just recently finished implementing the gateway construction part, and it takes these parameters already into account.
It would be a bit cumbersome though, if one had to decide which upgrades a gateway should have from the get-go. So, this week I started working on the upgrade mechanism.
It will be very similar to the construction part, with subtle differences. An upgrade motion will be filed by one of the parliament members and voted upon. It'll specify which component should be upgraded to what level, as well as who is going to do it.
After the motion passes, just as with the construction process, a contract between the government and the contractor is formed. Once the contractor accepts the contract and starts the upgrade, a construction store is created which will hold the exact number of materials necessary for the upgrade. Once the construction store is filled with the necessary materials, the upgrade completes automatically.
To prevent confusion and potential sources of errors, a gateway can only ever have one upgrade in process at a time.
I am spending a bit more time on this, and generalize the whole process, so it can be used for other (future) infrastructure types as well.
This week I also fixed a performance issue in the form of a memory leak that caused some of the recent server restarts. I just had a look and analyzed a memory dump, the issue seems to be fixed. While investigating, I also found a few other things I added to my watchlist, that might become an issue in the future. We really should take time to look into the performance more often!
As always: we'd love to hear what you think: join us on Discord or the forums!
Happy trading!