Chainlink Developers

Welcome to the Chainlink documentation site. You'll find comprehensive guides and documentation to help you start working with Chainlink as quickly as possible, as well as support if you get stuck. Click here for an introductory walkthrough on how to create a Chainlink request on the Ropsten test network!

Architecture Overview

In the diagram above, we see 4 distinct entities:

  • External Data
  • External Adapter(s)
  • Chainlink Node
  • Blockchain Node

These entities represent the major external components of Chainlink's architecture. Below, we will dive into the details of each one and discuss their relationship, represented by the arrows, with one another. It's important to note that while these entities are separated in the diagram, external adapters, the Chainlink node, and the blockchain node may all exist on the same resource.

External Data

External data may represent an API, whether open or private, another blockchain, network, or any repository of data that would need to be read or written to.

External Adapter(s)

External Adapters allow for additional functionality outside of what is supported within the core Chainlink Adapters. External adapters may be written in any language and can operate as a separate service that accepts and responds with JSON formatted data.

The red arrow above the External Adapter(s) entity represents connectivity between the adapter and external data. This may be necessary when the external data provider requires authentication in order to establish connectivity. Credentials for that provider can be stored in the adapter, rather than the Chainlink node itself, giving the node operator complete control over how to securely store their credentials. The Chainlink node will pass an "id" to the external adapter, which is the JobRunID that the external adapter should include in its response back.

Chainlink Node

The Chainlink node handles jobs, tasks, scheduling, and signing transactions for the blockchain. The Chainlink node runs through a specified set of sequential processes and includes a number of core adapters which give it support to read and process data, and write to the blockchain. The Chainlink node also contains the keystores used to sign transactions. This prevents needing to keep the sensitive keystore files unlocked on the blockchain node.

The green arrow represents connectivity to external data which does not require any sort of authentication. The Chainlink node can read open APIs, process their response, and write to the blockchain without any external adapters.

The blue arrow represents the Chainlink node's connectivity to its external adapter(s). The node operator must provision and add each external adapter they are willing to support as a bridge, and the adapter may be on a separate system than that which the Chainlink node resides on.

Blockchain Node

The blockchain node monitors the blockchain and allows the Chainlink node to look for specific events to occur to initiate a job. It also allows the node to broadcast its signed transactions, which return data to consuming contracts. In the case of the blockchain node going offline, the Chainlink node will continuously attempt to reconnect, and monitor the missed blocks when connectivity is restored.

The black arrow represents connectivity between the Chainlink and the blockchain node. The Chainlink node will subscribe to the blockchain node in order to read events occurring on the blockchain, and send signed transactions to it in order to publish responses.