Posts

1st Update of 2022 on HivePizza development work

avatar of @hivetrending
25
@hivetrending
·
0 views
·
3 min read

1st Update of 2022 on HivePizza development work

This post gives some visibility into development work done by the HivePizza team. We want to test this new communication channel because code changes or infrastructure upgrades are often not worthy of a whole post on their own. There is often a lot happening behind the scenes that's not readily visible to most of our community. In these posts, we’ll also cover some in-progress research that has not yet manifested in new features or products. Let's go!


Pizza Staker Discord Role Checker

We have a helper script that periodically checks if community members staked or unstaked enough tokens to move between ranks. This script enables the moderator team to celebrate when folks level up, with up to 30 minutes delay.

This week we had to update the script because a wallet passed 100,000 staked Pizza tokens for the first time, earning the “Grand Barony” role. This script was future-proofed and now checks for these levels: 100K, 200K, 400K.


HivePizza Discord Roles Overhaul

The HivePizza discord server uses a long list of roles for various purposes, such as spam prevention. The list of roles grew to a point where it became difficult to manage. It has been completely overhauled with a beautiful color scheme and dividers that separate roles by category. The new, clean roles make life easier for moderators and community members alike.


Beem Python Library Community Ownership

Some HivePizza projects rely heavily on a Python module called beem. Unfortunately, this module is falling behind on maintenance and could have issues with upcoming Hardforks or other API changes. The ideal solution is to migrate to a community-controlled code fork with no single owner.

Beem already has an out-of-date community fork in GitLab, which could replace public packages. We recently started discussing with @brianoflondon and others to determine a path forward. I also reached out to @holger80, who controls the beem GitHub repo, to see if we can collaborate on a plan to migrate PyPi to the community-controlled fork.


PizzaBot Discord Bot Enhancements

This week, our PizzaBot discord helper bot received some upgrades that support HivePizza’s three thriving Splinterlands guilds.

New Splinterlands utility commands for Pizza guild members:

!sl brawl timer Displays the time remaining until the next brawl starts. * Or the time remaining until the current brawl ends.

  • !sl brawl status Displays the current brawl status for all PIZZA guilds. Includes current placement in the brawl, the # of wins, losses, draws, and # of remaining battles. !sl guild power Displays a list of guild members with a high enough rating to advance to a higher league but not enough collection power.
    • This is meant to help folks share excess collection power so that guildies move up in leagues and earn more rewards.

HTTPS/SSL enabled for dlux.hive.pizza

This week we enabled HTTPS encryption for our DLUX API node “dlux.hive.pizza”. So now our API node works with DLUXMonitor, i.e. https://hiveuprss.github.io/dluxmonitor/?node=https://dlux.hive.pizza.

SSL setup ate a few hours because of installing certbot dependencies. A component called snapd refused to install correctly. We found a workaround by installing certbot via a Python virtual environment. Certbot is configured to request short-lived “Let’s Encrypt” certificates automatically.

Disregardfiat found another issue after we finished deploying the new SSL certs. The root cause was an extra DNS record for the domain dlux.hive.pizza. Some browsers were getting lucky and receiving a DNS response where the incorrect server was the first IP address returned. In those cases, the server provided the wrong SSL cert and failed to match dlux.hive.pizza. Interestingly the erroneous DNS configuration was magically working okay with HTTP (clear-text).


Project X - HTTPS and UI Improvements

A similar certbot HTTPS setup was implemented for unannounced Project X. Firewall configuration was adjusted to match, and code was updated in various places to start using HTTPS, port 443.

Some minor CSS style work made the front-end web app look prettier. In addition, we made progress on a new feature that highlights valid actions on the front-end.


Research In Progress - Discord Slash Commands

We started looking into Discord Application Commands (aka Slash Commands) to replace the clunky !COMMAND format. Many Discord bots have already begun moving to the Slash command format. Application Commands improve the user experience because they are more intuitive and don’t pollute the chat like text commands. Over time all of the current PizzaBot Discord bot commands will move to the Slash Command format.


@Hive.Pizza is set as a 25% beneficiary for this post’s rewards.

Please consider supporting Hive.Pizza by voting for @pizza.witness. [vote link]

Enjoy a premium Discord experience and help on-board New-bees at https://discord.gg/hivepizza

Learn more about HivePizza and browse the Pizza shop at https://hive.pizza