Skip to content

Commit 4b5af6a

Browse files
committed
docs: Typos and formatting
1 parent a3a59c5 commit 4b5af6a

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

Diff for: docs/Invariants.md

-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ This document specifies invariants of the Scribe and ScribeOptimistic oracle con
1616
→ postTx(_pokeData.age) == block.timestamp
1717
```
1818
19-
2019
## `ScribeOptimistic::_pokeData`
2120
2221
* Only `poke`, `opPoke`, `opChallenge` and `_afterAuthedAction` protected auth'ed functions may mutate `_pokeData`:
@@ -37,7 +36,6 @@ This document specifies invariants of the Scribe and ScribeOptimistic oracle con
3736
→ postTx(_pokeData) = preTx(_opPokeData) ⋀ preTx(readWithAge()) = preTx(_opPokeData)
3837
```
3938
40-
4139
## `{Scribe, ScribeOptimistic}::_pokeData`
4240
4341
* `_pokeData.age` is strictly monotonically increasing:
@@ -48,7 +46,6 @@ This document specifies invariants of the Scribe and ScribeOptimistic oracle con
4846
4947
* `_pokeData.val` can only be read by _toll'ed_ caller.
5048
51-
5249
## `ScribeOptimistic::_opPokeData`
5350
5451
* Only `opPoke`, `opChallenge` and `_afterAuthedAction` protected auth'ed functions may mutate `_opPokeData`:
@@ -69,7 +66,6 @@ This document specifies invariants of the Scribe and ScribeOptimistic oracle con
6966
→ postTx(_opPokeData.val) == 0 ⋀ postTx(_opPokeData.age) == 0
7067
```
7168
72-
7369
## `{Scribe, ScribeOptimistic}::_pubKeys`
7470
7571
* `_pubKeys[0]` is the zero point:
@@ -112,7 +108,6 @@ This document specifies invariants of the Scribe and ScribeOptimistic oracle con
112108
→ authed(msg.sender)
113109
```
114110
115-
116111
## `{Scribe, ScribeOptimistic}::_feeds`
117112
118113
* Image of mapping is `[0, _pubKeys.length)`:

Diff for: docs/Scribe.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ The Scribe contract also allows the creation of an _optimistic-flavored_ oracle
2626

2727
Scribe implements _Chronicle Protocol_'s [`IChronicle`](https://github.com/chronicleprotocol/chronicle-std/blob/v1/src/IChronicle.sol) interface for reading the oracle's value.
2828

29-
To protect authorized functions, Scribe uses `chronicle-std`'s [`Auth`](https://github.com/chronicleprotocol/chronicle-std/blob/v1/src/auth/Auth.sol) module. Functions to read the oracle's value are protected via `chronicle-std`'s [`Toll`](https://github.com/chronicleprotocol/chronicle-std/blob/v1/src/toll/Toll.sol) module.
30-
29+
To protect authorized functions, Scribe uses `chronicle-std`'s [`Auth`](https://github.com/chronicleprotocol/chronicle-std/blob/v2/src/auth/Auth.sol) module. Functions to read the oracle's value are protected via `chronicle-std`'s [`Toll`](https://github.com/chronicleprotocol/chronicle-std/blob/v2/src/toll/Toll.sol) module.
3130

3231
## Schnorr Signature Scheme
3332

3433
Scribe uses a custom Schnorr signature scheme. The scheme is specified in [docs/Schnorr.md](./Schnorr.md).
3534

3635
The verification logic is implemented in [`LibSchnorr.sol`](../src/libs/LibSchnorr.sol). A Solidity library to (multi-) sign data is provided via [`script/libs/LibSchnorrExtended.sol`](../script/libs/LibSchnorrExtended.sol).
3736

38-
3937
## Elliptic Curve Computations
4038

4139
Scribe needs to perform elliptic curve computations on the secp256k1 curve to verify aggregated/multi signatures.
@@ -48,7 +46,6 @@ This optimization allows Scribe to aggregate public keys, i.e. compute the sum o
4846

4947
For more info, see [`LibSecp256k1::addAffinePoint()`](../src/libs/LibSecp256k1.sol).
5048

51-
5249
## Encoding Participating Public Keys
5350

5451
The `poke()` function has to receive the set of feeds, i.e. public keys, that participated in the Schnorr multi-signature.
@@ -57,16 +54,14 @@ To reduce the calldata load, Scribe does not use type `address`, which uses 20 b
5754

5855
For more info, see [`LibSchnorrData.sol`](../src/libs/LibSchnorrData.sol).
5956

60-
6157
## Lifting Feeds
6258

63-
Feeds _must_ prove the integrity of their public key by proving the ownership of the corresponding private key. The `lift()` function therefore expects an ECDSA signed message derived from `IScribe::wat()`.
59+
Feeds _must_ prove the integrity of their public key by proving the ownership of the corresponding private key. The `lift()` function therefore expects an ECDSA signed message, for more info see [`IScribe.feedRegistrationMessage()`](../src/IScribe.sol).
6460

6561
If public key's would not be verified, the Schnorr signature verification would be vulnerable to rogue-key attacks. For more info, see [`docs/Schnorr.md`](./Schnorr.md#key-aggregation-for-multisignatures).
6662

6763
Also, the number of state-changing `lift()` executions is limited to `type(uint8).max-1`, i.e. 254. After reaching this limit, no further `lift()` calls can be executed. For more info, see [`IScribe.maxFeeds()`](../src/IScribe.sol).
6864

69-
7065
## Chainlink Compatibility
7166

7267
Scribe aims to be partially Chainlink compatible by implementing the most widely, and not deprecated, used functions of the `IChainlinkAggregatorV3` interface.
@@ -75,7 +70,6 @@ The following `IChainlinkAggregatorV3` functions are provided:
7570
- `latestRoundData()`
7671
- `decimals()`
7772

78-
7973
## Optimistic-Flavored Scribe
8074

8175
_ScribeOptimistic_ is a contract inheriting from Scribe and providing an _optimistic-flavored_ Scribe version. This version is intended to only be used on Layer 1s with expensive computation.
@@ -88,7 +82,6 @@ If an `opPoke()` is not challenged, its value finalizes after a specified period
8882

8983
Monitoring optimistic pokes and, if necessary, challenging them can be incentivized via ETH rewards. For more info, see [`IScribeOptimistic::maxChallengeReward()`](../src/IScribeOptimistic.sol).
9084

91-
9285
### About Bounded Gas Usage
9386

9487
For all functions being executed during `opChallenge()`, it is of utmost importance to have bounded gas usage. These functions are marked with `@custom:invariant` specifications documenting their gas usage.
@@ -99,7 +92,6 @@ Two loops are executed during an `opChallenge()`:
9992
1. Inside `Scribe::_verifySchnorrSignature` - bounded by `bar`
10093
2. Inside `LibSecp256k1::_invMod` - computing the modular inverse of a Jacobian `z` coordinate of a secp256k1 point
10194

102-
10395
### Verifying Optimistic Pokes
10496

10597
1. Listen to `opPoked` events:

0 commit comments

Comments
 (0)