Skip to content

Commit ac7eac4

Browse files
committed
Update README
1 parent 2fe8c61 commit ac7eac4

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
# libocr
22

3-
libocr consists of a Go library and a set of Solidity smart contracts that implement the *Chainlink Offchain Reporting Protocol*, a [Byzantine fault tolerant](https://en.wikipedia.org/wiki/Byzantine_fault) protocol that allows a set of oracles to generate *offchain* an aggregate report of the oracles' observations of some underlying data source. This report is then transmitted to an onchain contract in a single transaction.
3+
libocr consists of a Go library and a set of Solidity smart contracts that implements various versions of the *Chainlink Offchain Reporting Protocol*, a [Byzantine fault tolerant](https://en.wikipedia.org/wiki/Byzantine_fault) "consensus" protocol that allows a set of oracles to generate *offchain* an aggregate report of the oracles' observations of some underlying data source. This report is then transmitted to an onchain contract in a single transaction.
44

5-
You may also be interested in [libocr's integration into the actual Chainlink node](https://github.com/smartcontractkit/chainlink/tree/develop/core/services/offchainreporting).
5+
You may also be interested in libocr's integration into the actual Chainlink node. ([V1](https://github.com/smartcontractkit/chainlink/tree/develop/core/services/ocr) [V2](https://github.com/smartcontractkit/chainlink/tree/develop/core/services/ocr2) [V3](https://github.com/smartcontractkit/chainlink/tree/develop/core/services/ocr3))
66

77

88
## Protocol Description
99

10-
Protocol execution mostly happens offchain over a peer to peer network between Chainlink nodes. The nodes regularly elect a new leader node who drives the rest of the protocol. The protocol is designed to choose each leader fairly and quickly rotate away from leaders that aren’t making progress towards timely onchain reports.
10+
Please see the whitepapers available at https://chainlinklabs.com/research for detailed protocol descriptions.
1111

12-
The leader regularly requests followers to provide freshly signed observations and aggregates them into a report. It then sends the aggregate report back to the followers and asks them to attest to the report's validity by signing it. If a quorum of followers approves the report, the leader assembles a final report with the quorum's signatures and broadcasts it to all followers.
13-
14-
The nodes then attempt to transmit the final report to the smart contract according to a randomized schedule. Finally, the smart contract verifies that a quorum of nodes signed the report and exposes the median value to consumers.
12+
## Protocol Versions
1513

14+
- OCR1 is deprecated and being phased out.
15+
- OCR2 & OCR3 are in production.
16+
- OCR3.1 is in alpha and excluded from any bug bounties at this time.
1617

1718
## Organization
1819
```
19-
.
20-
├── contract: Ethereum smart contracts
20+
├── bigbigendian: helper package
21+
├── commontypes: shared type definitions
22+
├── contract: OCR1 Ethereum contracts
23+
├── contract2: OCR2 Ethereum contracts
24+
├── contract3: OCR3 Ethereum contracts
2125
├── gethwrappers: go-ethereum bindings for the OCR1 contracts, generated with abigen
2226
├── gethwrappers2: go-ethereum bindings for the OCR2 contracts, generated with abigen
23-
├── networking: p2p networking layer
24-
├── offchainreporting: offchain reporting protocol version 1
25-
├── offchainreporting2: offchain reporting protocol version 2 specific packages, not much here
26-
├── offchainreporting2plus: offchain reporting protocol version 2 and beyond
27-
├── permutation: helper package for generating permutations
28-
└── subprocesses: helper package for managing go routines
27+
├── gethwrappers3: go-ethereum bindings for the OCR3 contracts, generated with abigen
28+
├── networking: OCR networking layer
29+
├── offchainreporting: OCR1
30+
├── offchainreporting2: OCR2-specific
31+
├── offchainreporting2plus: OCR2 and beyond (These versions share many interface definitions to make integration of new versions easier)
32+
├── permutation: helper package
33+
├── quorumhelper: helper package
34+
├── ragep2p: p2p networking
35+
└── subprocesses: helper package
2936
```

0 commit comments

Comments
 (0)