## Changelog for the New Release ### New Features - **Lease Module**: Introduced a new module to manage leasing of nodes by providers. Key features include: - Providers can lease nodes for a specified number of hours (minimum 1 hour). The maximum duration is governed by a governance proposal, with a default of 720 hours. - At any given time, only one active lease is allowed between a provider and a node pair. New leases cannot be created for a provider-node pair with an existing active lease. - **Node Pricing**: Nodes set their hourly price on-chain. Providers can lease nodes by locking the required deposit based on the hourly price and lease duration. - Example: If a provider leases a node for 10 hours at a rate of 10 $DVPN/hour, 100 $DVPN is locked as a deposit. Each hour, 10 $DVPN is deducted, with: - 20% sent to the community pool. - 80% sent to the node. - Leases are automatically marked as ended and removed from the blockchain state after the lease duration. - **Renewable Leases**: Providers can opt for renewable leases. - Upon renewal, if the hourly rate changes (e.g., from 10 $DVPN to 12 $DVPN), the updated rate is applied, and the required deposit is recalculated. - **Flexible Management**: Providers can: - End leases at any time, with refunds issued for unused hours. - Toggle leases between renewable and non-renewable states. - **Automatic End Conditions**: - Leases are automatically terminated if the node becomes inactive, ensuring providers are not charged unnecessarily. - When a node associated with an active lease becomes inactive, that particular node is removed from all subscription plans created by the provider. - **Oracle Module**: Introduced a new module to manage asset price information, enabling seamless integration with other modules. Key features include: - **Asset Management**: Each asset is defined by parameters such as: - **Base Denomination**, **Quote Denomination**, and **Pool ID**: These fields are used for acquiring the spot price information from the Osmosis blockchain. The **Pool ID** information is also updated using the AsyncICQ module. - **Governance Control**: Both asset information and the frequency of query requests can be updated through governance proposals by the community. - **IBC-Based Price Queries**: The Sentinel blockchain uses Inter-Blockchain Communication (IBC) with the AsyncICQ module to query price information from the Osmosis blockchain: - Sentinel sends query requests for asset prices to the Osmosis blockchain every **N blocks**. - Relayers deliver query packets to Osmosis, which processes the request and sends a response as an acknowledgment. - Sentinel processes the responses and updates the price information for specific assets in its state. - **Real-Time Price Updates**: The module ensures that market price fluctuations are reflected on Sentinel. For example: - A node setting a price in USD (e.g., $1) can use Oracle to convert this to the settling denomination (e.g., $DVPN or $ATOM) based on real-time prices. - **Module Integrations**: - **Lease Module**: Oracle provides real-time hourly price information for nodes, ensuring accurate and dynamic pricing during lease creation and renewal. - **Node Module**: Oracle enables dynamic pricing for both hourly rates and gigabyte-based rates, reflecting market fluctuations in real time while creating the session. - **Subscription Plan Module**: Oracle ensures that subscription plan pricing is dynamic, adjusting based on current market rates to maintain consistency and accuracy. This module enhances interoperability and ensures accurate and dynamic price information for cross-chain and on-chain interactions across multiple modules. ### Modifications and Enhancements - **Node Module**: - **USD-Based Pricing**: Nodes can now set pricing details exclusively in USD format (e.g., $1 per hour or per gigabyte). The settlement will be conducted in a specified cryptocurrency such as $DVPN, $ATOM, or other denominations, with conversion handled using Oracle module data. - **Free Pricing Option**: Node operators can now opt to provide their services free of charge by not setting any pricing information. - **Removed Maximum Price Validation**: The maximum price validation for node pricing has been removed, allowing greater flexibility for node operators to set their desired pricing. - **Streamlined Session Creation**: - Previously, users were required to subscribe to a node by locking tokens or coins before creating hourly or gigabyte-based sessions (e.g., pay-as-you-go sessions). - In the new version, this subscription step has been eliminated. Users can now start sessions directly with a node without prior subscription. - Users can create multiple sessions for a node at any time. During session creation, users specify the number of hours or gigabytes they wish to use, and the corresponding amount is locked as a deposit. - At the end of the session, the deposit is used to pay the node, with any refunds for unused time or data automatically returned to the user. - **Single Transaction Efficiency**: The new process reduces the previous two-step requirement to a single transaction, significantly decreasing session creation time. Given the average block time of six seconds, users can now create an on-chain session within just one transaction, improving overall efficiency and user experience. - **Multiple Active Sessions**: - Previously, users were limited to one active session at a time for a specific node (user-node pairs were unique). - In the new version, users can create and maintain multiple active sessions simultaneously for the same node, offering greater flexibility in usage. - **Subscription Plan Module**: - **USD-Based Pricing**: Providers can now create subscription plans where the pricing information is set exclusively in USD format (e.g., $5 per month). - When a user subscribes to a plan, the blockchain uses the Oracle module to convert the USD price into the settlement denomination (e.g., $DVPN or $ATOM). - **Free Subscription Plans**: Providers now have the option to set the subscription plan price as free, allowing users to subscribe without any payment. - **Revenue Distribution**: Upon subscription: - A portion of the payment (e.g., 20%) is sent to the community pool. - The remaining percentage is transferred to the provider’s address. - **Streamlined Session Creation**: - Users can now create a session directly for a subscription plan in a single transaction. - Internally, the blockchain automatically creates the subscription and the session for the subscription in one step. This eliminates the need for two separate transactions, significantly reducing user effort and improving efficiency. - **Subscription Module**: - **Automatic Renewal**: Subscriptions for subscription plans can now be renewed automatically. - Users can enable the renewal process by making a transaction. - During renewal, the price information for the subscription plan is fetched from the Oracle module, ensuring real-time pricing. The corresponding amount is deducted from the user's account and paid to the provider. - **Session Module**: - **Separate Session Types**: In the new version, sessions are categorized into two distinct types: - **Node-Based Sessions**: Specifically for sessions created for nodes. At the end of these sessions, payments are made directly to the node based on the usage (e.g., hourly or gigabyte-based pricing). - **Subscription-Based Sessions**: Specifically for sessions created as part of a subscription. These sessions do not involve any direct payments. Instead, they update the allocation of data or bandwidth as part of the subscription. - Previously, a single session type was used for both node-based and subscription-based sessions. This new categorization provides clarity and separates the handling logic for each type. - **Automatic Session Inactivation**: - Sessions will now become inactive under the following conditions: - The node associated with the session becomes inactive. - The subscription associated with the session becomes inactive. - The node is removed from the subscription plan. ### Generic Updates - **Cosmos SDK Upgrade**: Upgraded the Cosmos SDK version to `v0.47.X` for improved stability, performance, and compatibility with the latest ecosystem standards. - **CometBFT Upgrade**: Updated the CometBFT version to the release (`v0.37.X`), ensuring enhanced consensus mechanisms and reliability. - **CosmWasm Upgrade**: Updated the CosmWasm version to the release (`v0.46.X`), providing improved smart contract capabilities and better developer experience. - **IBC Upgrade**: Upgraded the IBC protocol version to (`v7.8.X`) enhance interchain communication, ensuring compatibility with the latest standards and improving cross-chain interactions. - **Optimized Queries**: Improved the efficiency of various queries across modules, reducing response times and enhancing overall performance.