Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify lexicographical ordering for multi oracle #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions MultiOracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,17 @@ To summarize, for n-of-n oracle support, the 2-of-2 algorithm is run where the p
* `2^(n-1) - 1` aggregate non-middle points for each side
* Totaling `2^n - 2` non-middle aggregate points.

Note that for n-of-n oracle support, the order in which outcomes are assigned to each oracle for each possible combination need to be consistent between implementation.
In order to guarantee this, it is required that secondary oracle outcomes be ordered in lexicographical order.
For example, assuming 3 oracles attesting three digits values with a `maxErrorExp` of 2 and a `minSupportExp` of 1, the combinations for when the primary oracle signs the value `2` should be:

| Primary oracle value | Second oracle value | Third oracle value |
|---|---|---|
| 0 1 0 | 0 | 0 |
| 0 1 0 | 0 | 1 0 |
| 0 1 0 | 1 0 | 0 |
| 0 1 0 | 1 0 | 1 0 |

#### Analysis

Luckily, there are very few large primary intervals in any given DLC.
Expand Down