mirror of
https://github.com/aljazceru/dlcspecs.git
synced 2025-12-17 06:14:23 +01:00
Removed ranged event descriptors (#139)
* Removed ranged event descriptors * Fixed things Tibo caught
This commit is contained in:
35
Oracle.md
35
Oracle.md
@@ -11,14 +11,11 @@ This necessary information is committed to in a so-called [_event descriptor_](#
|
||||
- [Event descriptor](#event-descriptor)
|
||||
- [Simple enumeration](#simple-enumeration)
|
||||
- [Example: Weather tomorrow](#example-weather-tomorrow)
|
||||
- [Range](#range)
|
||||
- [Example: tomorrow's temperature](#example-tomorrows-temperature)
|
||||
- [Digit decomposition](#digit-decomposition)
|
||||
- [Example: BTC/USD rate](#example-btcusd-rate)
|
||||
- [Serialization and signing of outcome values](#serialization-and-signing-of-outcome-values)
|
||||
- [Serialization of event descriptors](#serialization-of-event-descriptors)
|
||||
- [Version 0 `enum_event_descriptor`](#version-0-enum_event_descriptor)
|
||||
- [Version 0 `range_event_descriptor`](#version-0-range_event_descriptor)
|
||||
- [Version 0 `digit_decomposition_event_descriptor`](#version-0-digit_decomposition_event_descriptor)
|
||||
- [Oracle events](#oracle-events)
|
||||
- [Version 0 `oracle_event`](#version-0-oracle_event)
|
||||
@@ -34,7 +31,7 @@ An event descriptor provides information to clients about an event for which an
|
||||
The provided information should be sufficient for a client to create a set of adaptors signatures for some CETs that will cover all possible outcomes of the event.
|
||||
|
||||
Here we assume that an event outcome can be represented either as a set of strings or numbers.
|
||||
Three kinds of event outcomes are defined (note that a single event can be composed of several types).
|
||||
Two kinds of event outcomes are defined (note that a single event can be composed of several types).
|
||||
|
||||
### Simple enumeration
|
||||
|
||||
@@ -44,26 +41,6 @@ For events that have a narrow range of possible outcomes, the outcomes can simpl
|
||||
|
||||
Tomorrow's weather can be represented as the set of strings `[sunny, cloudy, rainy]`.
|
||||
|
||||
### Range
|
||||
|
||||
When an event has numerical outcomes that cannot be easily enumerated, they can be represented as a series with:
|
||||
|
||||
- start: the first possible outcome number
|
||||
- count: the number of possible outcomes
|
||||
- step: the increment
|
||||
- unit: the unit of the outcome value
|
||||
- precision: the precision of the outcome representing the base exponent by which to multiply the signed number to obtain the actual outcome value.
|
||||
|
||||
#### Example: tomorrow's temperature
|
||||
|
||||
```
|
||||
start: -100
|
||||
count: 201
|
||||
step: 1
|
||||
unit: °C
|
||||
precision: 0
|
||||
```
|
||||
|
||||
### Digit decomposition
|
||||
|
||||
When a range of a numerical outcomes is large or unbounded, the oracle can represent the outcome using digit decomposition.
|
||||
@@ -140,16 +117,6 @@ This type of event descriptor is a simple enumeration where the value `n` is the
|
||||
|
||||
Note that `outcome_i` is the outcome value itself and not its hash that will be signed by the oracle.
|
||||
|
||||
#### Version 0 `range_event_descriptor`
|
||||
|
||||
1. type: 55304 (`range_event_descriptor_v0`)
|
||||
2. data:
|
||||
* [`int32`:`start`]
|
||||
* [`u32`:`count`]
|
||||
* [`u16`:`step`]
|
||||
* [`string`:`unit`]
|
||||
* [`int32`:`precision`]
|
||||
|
||||
#### Version 0 `digit_decomposition_event_descriptor`
|
||||
|
||||
1. type: 55306 (`digit_decomposition_event_descriptor_v0`)
|
||||
|
||||
Reference in New Issue
Block a user