Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo-lg committed Aug 13, 2022
1 parent 5176f01 commit 7022a99
Show file tree
Hide file tree
Showing 27 changed files with 12,405 additions and 11,755 deletions.
38 changes: 5 additions & 33 deletions Messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ All data fields are unsigned big-endian unless otherwise specified.

## Table of Contents

- [Connection Handling and Multiplexing](#connection-handling-and-multiplexing)
- [Message Format](#message-format)
- [Wire Messages](#wire-messages)
- [Type-Length-Value](#type-length-value)
Expand Down Expand Up @@ -58,11 +57,7 @@ All data fields are unsigned big-endian unless otherwise specified.
- [The `oracle_announcement` Type](#the-oracle_announcement-type)
- [`oracle_announcement`](#oracle_announcement)
- [Requirements](#requirements-2)
- [The `oracle_attestations` Type](#the-oracle_attestations-type)
- [`oracle_attestations`](#oracle_attestations)
- [`schnorr_attestation`](#schnorr_attestation)
- [The `oracle_attestation` Type](#the-oracle_attestation-type)
- [`oracle_attestation`](#oracle_attestation)
- [The `schnorr_attestation` Type](#the-schnorr_attestation-type)
- [Authors](#authors)

## Connection Handling and Multiplexing
Expand Down Expand Up @@ -529,22 +524,13 @@ where both the `announcement_signature` is a Schnorr signature over a sha256 has

Clients SHOULD check the `oracle_attestation_public_key` has been signed by the `oracle_announcement_public_key` in a known `oracle_metadata` message and SHOULD abort if the attestation key is not recognized.

### The `oracle_attestations` Type
### The `schnorr_attestation` Type

As [an oracle can support multiple attestation schemes](#the-oracleschemes-type), multiple attestations corresponding to each supported schemes can be embedded into a single attestation message.
Each attestation is serialized as a TLV to enable clients to easily ignore those they don't support.
Note that at the moment only the `schnorr_attestation` scheme is defined.
The `schnorr_attestation` type provides signatures over an event outcome result values.

#### `oracle_attestations`

1. data:
* [`bigsize`:`nb_attestations`]
* [`nb_attestations*attestation`:attestations]

#### `schnorr_attestation`

1. type: 0
1. type: 55356
1. data:
* [`string`:`event_id`]
* [`x_point`:`oracle_attestation_public_key`]
* [`bigsize`: `nb_outcomes`]
* [`nb_signatures*attested_outcome`:`attested_outcomes`]
Expand All @@ -554,20 +540,6 @@ Note that at the moment only the `schnorr_attestation` scheme is defined.
Where the signatures are ordered the same as the nonces in their original `oracle_event`.
The outcomes should be the message signed, ordered the same as the signatures.


### The `oracle_attestation` Type

This type contains information about the outcome of an event and the signature(s) over its outcome value(s).
As oracle attestations can be broadcast directly, they are encoded as [wire messages](#wire-messages).
See [the Oracle specifications](./Oracle.md#oracle-attestations) for more details.

#### `oracle_attestation`

1. type: 55400
1. data:
* [`string`:`event_id`]
* [`oracle_attestations`:oracle_attestations]

## Authors

Nadav Kohen <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions Oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Oracle events contain such information, which includes:
* the event descriptor,
* the event ID which can be a name or categorization associated with the event by the oracle.

The TLV serialization for oracle events is given in [the Messaging specifications](./Messaging.md#the-oracle_event-type).
The serialization for oracle events is given in [the Messaging specifications](./Messaging.md#the-oracle_event-type).

## Oracle announcements

Expand All @@ -121,14 +121,14 @@ This proof is given in a so-called oracle announcement, which contains an oracle

This also makes it possible for users to obtain oracle event information from an un-trusted peer while being guaranteed that it originates from a given oracle.

The TLV serialization of oracle announcements is given in [the Messaging specifications](./Messaging.md#the-oracle_announcement-type).
The serialization of oracle announcements is given in [the Messaging specifications](./Messaging.md#the-oracle_announcement-type).

## Oracle Attestations

After an event occurs, and the oracle creates signatures to attest the outcome, it needs to give them to users.
An oracle can use an attestation tlv to give users this information.

The TLV serialization of oracle attestations is given in [the Messaging specifications](./Messaging.md#the-oracle_attestation-type).
The TLV serialization of oracle attestations is given in [the Messaging specifications](./Messaging.md#the-schnorr_attestation-type).

## Signing Algorithm

Expand Down
120 changes: 60 additions & 60 deletions test/test_vectors/enum_3_of_3_test.json

Large diffs are not rendered by default.

Loading

0 comments on commit 7022a99

Please sign in to comment.