From 9682e961ea429f86b7469ed78e157ef6d3de3412 Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 29 Nov 2024 17:57:46 +0700 Subject: [PATCH] update readme --- x/feeds/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/x/feeds/README.md b/x/feeds/README.md index 638b860af..60137777c 100644 --- a/x/feeds/README.md +++ b/x/feeds/README.md @@ -21,7 +21,9 @@ This module is used in the BandChain. - [How Feed Interval and Deviation are calculated](#how-feed-interval-and-deviation-are-calculated) - [Current Feeds](#current-feeds) - [Validator Price](#validator-price) + - [Status](#status) - [Price](#price) + - [Status](#status-1) - [Reference Source Config](#reference-source-config) - [State](#state) - [ReferenceSourceConfig](#referencesourceconfig) @@ -42,6 +44,7 @@ This module is used in the BandChain. - [Input](#input) - [Objective](#objective) - [Assumption](#assumption) + - [Constraint](#constraint) - [Procedure](#procedure) - [Update current feeds](#update-current-feeds) - [Events](#events) @@ -95,6 +98,16 @@ The Validator Price refers to the price submitted by each validator before being The module only contains the latest price of each validator and signal ID. +#### Status + +Validator Price can reports three valid price status: + +1. `SIGNAL_PRICE_STATUS_UNSUPPORTED`: Indicates that the requested signal ID is not supported by this validator and will not be available in the foreseeable future unless an upgrade occurs. + +2. `SIGNAL_PRICE_STATUS_UNAVAILABLE`: Indicates that the requested signal ID is currently unavailable but is expected to become available in the near future. + +3. `SIGNAL_PRICE_STATUS_AVAILABLE`: Indicates that the price for the requested signal ID is available. + ### Price A Price is a structure that maintains the current price state for a signal ID, including its current price, price status, and the most recent timestamp. @@ -103,6 +116,18 @@ Once the Validator Price is submitted, it will be weighted median which is weigh The module only contains the latest price of each signal ID of Current feeds. +#### Status + +The price status includes the following valid states: + +1. `PRICE_STATUS_UNKNOWN_SIGNAL_ID`: Indicates that the price for this signal ID is not supported by the majority of price feeder and will not be available in the foreseeable future unless the feeders undergoes an upgrade of their price service registry. + +2. `PRICE_STATUS_NOT_READY`: Indicates that the price for this signal ID is currently not ready but is expected to become available in the near future. + +3. `PRICE_STATUS_AVAILABLE`: Indicates that the price for this signal ID is available. + +4. `PRICE_STATUS_NOT_IN_CURRENT_FEEDS`: Indicates that this signal ID is not included in the currently supported feeds but can be added through a voting process. + ### Reference Source Config The On-chain Reference Source Config is the agreed-upon version of the reference source suggested for validators to use when querying prices for the feeds. Only the admin address can update this configuration. @@ -200,6 +225,9 @@ message Params { // price_quorum is the minimum percentage of power that needs to be reached for a price to be processed. string price_quorum = 12; + + // MaxSignalIDsPerSigning is the maximum number of signals allowed in a single tss signing request. + uint64 max_signal_ids_per_signing = 13 [(gogoproto.customname) = "MaxSignalIDsPerSigning"]; } ``` @@ -341,6 +369,12 @@ A list of ValidatorPriceInfo objects, each containing: 1. No ValidatorPriceInfo has a power that exceeds 25% of the total power in the list. +#### Constraint + +1. If more than half of the total power of the validator price have unsupported price status, it returns a `PRICE_STATUS_UNKNOWN_SIGNAL_ID` price status with price 0. +2. If the total power of all validator prices reported is than price quorum percentage, it returns an `PRICE_STATUS_NOT_READY` price status with price 0. +3. If less than half of total power of prices reported have available price status, it also returns an `PRICE_STATUS_NOT_READY` price status with price 0. + #### Procedure 1. Filter and order the List: