Validators Development
JPTR Corporation
This document offers a clear and thoughtful summary of the tickets we’ve successfully closed over the past 30 days, along with an overview of the work currently in progress. It’s designed to give you a comprehensive snapshot of our significant achievements, all presented in an easy-to-read format, with insights summarized by ChatGPT from Jira issues.
We hope this overview highlights the hard work and dedication that has gone into each task, ensuring that our development efforts are both transparent and impactful.
A payment of $40,000.00 is required to be made to JPTR, Corporation. Please ensure the payment is made in the form of USDC to the Ethereum address:
0x57d917726073D7582022897F753B034aA593220c.
Note: Before submitting the full amount, please send a minimal test transaction to verify the accuracy of the transfer. Once confirmed, proceed with the full payment.
TLDR
- Migrated the unclaimed balances system to the validator and added new API endpoints for user access. Refactored the validator code, removing over 1,000 lines of duplication.
- Removed outdated features like voucher staking rewards, license voucher reward pools, and discounts, simplifying the system.
- Updated and validated tests after these changes to ensure system stability.
- Enhanced CI/CD pipelines for better deployment in QA environments.
- Upgraded hive nodes to the latest version, fixed critical issues, and improved deployment scripts for better node management.
- Overhauled the hived-proxy with better caching and compression, and resolved block corruption issues.
- Launched and configured the AWS account for the sl-validator environment, including schema migrations and service updates.
Migration & Refactoring: Enhancing System Efficiency and Developer Experience
Full Migration of the Unclaimed Balances System: Transitioned the remaining components of the unclaimed balances system from the legacy SM environment to the validator. This migration was critical to align the unclaimed balances system with the new infrastructure, ensuring full compatibility with ongoing updates and improvements.
Support for License Reward Pools: Integrated comprehensive support for license reward pools within the validator, facilitating smoother reward distribution and management.
Introduction of New API Endpoints for Enhanced User Interaction: Developed and deployed new API endpoints designed to allow users to easily retrieve their unclaimed balances. These endpoints provide greater transparency and control over individual reward accrual, enhancing user satisfaction and trust.
Extensive Validator Code Refactoring for Open Source Development: Conducted a thorough cleanup of the validator operation handling codebase. This included removing over 1,000 lines of redundant and duplicated code, significantly reducing code complexity. This refactoring effort was aimed at simplifying ongoing development, reducing the potential for errors, and making future updates more manageable.
Voucher Staking Rewards Decommissioning: Fully removed the voucher staking rewards from the system. This decision was part of a broader strategy to simplify the reward mechanisms and focus on more streamlined and effective incentives for users.
Phasing Out of Voucher Reward Pools: Methodically removed all components associated with the voucher reward pools that were tied to license purchases. This action was necessary to realign the reward structure with current business objectives and user expectations.
Elimination of Voucher Discounts in the Validator Shop: Discontinued the voucher discount feature for license purchases within the validator shop. This step was taken to simplify the purchasing process and eliminate any potential confusion among users regarding discount eligibility.
System-Wide Simplification Through Feature Removal: By removing outdated or redundant features, the system was streamlined, resulting in a more efficient and user-friendly experience. These removals were carefully planned to ensure minimal disruption while maximizing system performance and clarity.
Testing & Validation: Ensuring Robustness After Major Changes
Comprehensive Test Updates Following System Migration: Following the migration of the unclaimed balances system to the validator, all associated tests were meticulously updated. This ensured that the new system's functionality was fully validated and that no unintended issues were introduced during the migration.
Validation Post-Feature Decommissioning: After the removal of voucher staking rewards and reward pools, a thorough review and update of all relevant tests were conducted. This step was crucial to maintaining the integrity and reliability of the system after these significant changes.
Extensive Test Revisions for System Consistency: Ensured that all tests were aligned with the current state of the system, reflecting the removal of several features and the introduction of new functionalities. This extensive testing phase was critical to maintaining high standards of reliability and performance.
Continuous Integration & Deployment: Optimizing Deployment Processes
CI/CD Pipeline Enhancement for QA Environment Support: Upgraded the continuous integration and deployment (CI/CD) pipeline to better support deployments within the Splinterlands QA environments. This enhancement facilitates more efficient testing and validation processes, enabling faster iteration cycles and more robust releases.
Optimized Deployment Workflow for Consistent Updates: Improved the overall deployment workflow to ensure that updates are rolled out consistently and reliably across all environments. This optimization reduces the risk of deployment errors and ensures that all environments remain in sync with the latest codebase.
Hive Node Management: Upgrading and Stabilizing Critical Infrastructure
Hive Node Issue Resolution for Improved Stability: Addressed and resolved critical issues with multiple hive nodes (including hived.splinterlands.com, hived-2.splinterlands.com, and the internal Splinterlands node). These issues were primarily related to get_account_history calls returning invalid responses, which required a deep investigation and a full replay of the nodes due to changes in the hived state format introduced in version 1.27.4.
Full Replay Implementation to Support Latest Node Version: Performed a full replay of the hive nodes to accommodate the changes in the state format, ensuring that all nodes are fully updated and operating correctly on the latest version, 1.27.6.
Node Upgrade and Migration to Ubuntu 22.04: Upgraded all hive nodes to the latest software version (1.27.6) and migrated the underlying operating system to Ubuntu 22.04. This upgrade was necessary to ensure continued compatibility with the latest features and security updates, as well as to improve overall node performance.
Docker Health Check Integration for Node Stability: Implemented a Docker health check mechanism to automatically monitor and restart nodes if they become unresponsive or encounter errors. This proactive approach helps to maintain node stability and minimize downtime.
Monitoring Node Sync Progress Post-Upgrade: Actively monitored the sync process of the upgraded nodes to ensure successful and complete deployment. This ongoing oversight is critical to confirming that all nodes are fully operational and synchronized.
Deployment Script Rewriting for Simplified Node Management: Rewrote the existing Docker deployment scripts to simplify the process of deploying and replaying hive nodes. These improvements make it easier to manage node upgrades and ensure that all nodes remain in a consistent and reliable state.
Proxy & Caching: Enhancing Data Integrity and Performance
Complete hived-proxy Overhaul: Rewrote the hived-proxy to include enhanced caching mechanisms for the latest live blocks and introduced a gzip compression pipeline. This overhaul was necessary to optimize performance and reduce latency in serving live data.
Resolution of Cloudflare TransformStream Issue: Identified and resolved an issue with Cloudflare’s TransformStream update, which caused corruption in blocks beyond the 78 million mark. This required pinpointing the exact block where corruption began and removing all affected blocks to restore data integrity.
Reimplementation of CompressionStream for Data Storage: Reimplemented the CompressionStream to store up to 1,000 blocks in R2 storage using gzip. This change was crucial for optimizing storage space while ensuring that stored data remains easily accessible and uncorrupted.
Block Integrity Verification for R2 Storage: Verified that all blocks stored in R2 storage are consistent with the new data structure and can be successfully decrypted. This verification process was essential to ensuring that the system's data integrity was maintained after the updates.
Cronjob Optimization for Latest Block Retrieval: Rewrote the cronjob responsible for retrieving and caching the latest 1,000 blocks. This optimization ensures that the system always has the most recent data available, improving the performance and responsiveness of live data services.
sl-validator Environment Deployment: Establishing a Robust New Environment
Terraform Configuration Update for OIDC Integration: Updated Terraform configurations to support OpenID Connect (OIDC) from GitHub for deployments. This update was necessary to ensure secure and streamlined authentication processes during deployments.
AWS Account Launch and Setup for sl-validator: Launched a new AWS account specifically for the sl-validator environment. This included applying a comprehensive bootstrap environment to ensure that all necessary configurations and resources were correctly established from the outset.
Database Migrations and User Creation for sl-validator: Successfully applied database migrations to the sl-validator environment, ensuring that all necessary schema changes were in place. Additionally, created the required user accounts to support ongoing operations within the sl-validator environment.
Service Configuration for Validator Operations: Updated existing services to ensure they are compatible with and fully support validator operations. This included managing configuration files and secrets to align with the unique requirements of the sl-validator environment.
Schema Separation for Validator Environment: Adjusted the validator environment to operate within a completely separate schema, preventing potential conflicts with other environments and ensuring that validator operations remain isolated and secure.
Schema Migrations for Validator Integration: Applied the necessary schema migrations to fully integrate the validator within the new environment. This step was critical to ensuring that all aspects of the validator's functionality were properly supported and aligned with the new infrastructure.