node of the decentralized oracle network, bridging on and off-chain computation
node of the decentralized oracle network, bridging on and off-chain computation
This repo contains the Chainlink core node and contracts. The core node is the bundled binary available to be run by node operators participating in a decentralized oracle network. All major release versions have pre-built docker images available for download from the Chainlink dockerhub. If you are interested in contributing please see our contribution guidelines. If you are here to report a bug or request a feature, please check currently open Issues. For more information about how to get started with Chainlink, check our official documentation.
Chainlink has an active and ever growing community. Discord is the primary communication channel used for day to day communication, answering development questions, and aggregating Chainlink related content. Take a look at the community docs for more information regarding Chainlink social accounts, news, and networking.
export PATH=$GOPATH/bin:$PATH & export GOPATH=/Users/$USER/gonvm install $NODE_VERSION && nvm use $NODE_VERSION?sslmode=disable in your Postgres query string).git clone https://github.com/smartcontractkit/chainlink && cd chainlinkmake installchainlink helpFor the latest information on setting up a development environment, see the Development Setup Guide.
To build an unofficial testing-only image from a feature branch or PR. You can do one of the following:
docker-build workflow.build-publish label to your PR and then either retry the docker-build workflow, or push a new commit.Plugins are defined in yaml files within the plugins/ directory. Each plugin file is a yaml file and has a plugins. prefix name. Plugins are installed with loopinstall.
To install the plugins, run:
make install-pluginsSome plugins (such as those in plugins/plugins.private.yaml) reference private GitHub repositories. To build these plugins, you must have a GITHUB_TOKEN environment variable set, or preferably use the gh GitHub CLI tool to use the GitHub CLI credential helper like:
# Sets up a credential helper.
gh auth setup-gitThen you can build the plugins with:
make install-plugins-privateTo build the experimental "plugins" Chainlink docker image, you can run this from the root of the repository:
# The GITHUB_TOKEN is required to access private repos which are used by some plugins.
export GITHUB_TOKEN=$(gh auth token) # requires the `gh` cli tool.
make docker-pluginsIn order to run the Chainlink node you must have access to a running Ethereum node with an open websocket connection. Any Ethereum based network will work once you've configured the chain ID. Ethereum node versions currently tested and supported:
[Officially supported]
[Supported but broken] These clients are supported by Chainlink, but have bugs that prevent Chainlink from working reliably on these execution clients.
We cannot recommend specific version numbers for ethereum nodes since the software is being continually updated, but you should usually try to run the latest version available.
NOTE: By default, chainlink will run in TLS mode. For local development you can disable this by using a dev build using make chainlink-dev and setting the TOML fields:
[WebServer]
SecureCookies = false
TLS.HTTPSPort = 0
[Insecure]
DevWebServer = trueAlternatively, you can generate self signed certificates using tools/bin/self-signed-certs or manually.
To start your Chainlink node, simply run:
chainlink node startBy default this will start on port 6688. You should be able to access the UI at http://localhost:6688/.
Chainlink provides a remote CLI client as well as a UI. Once your node has started, you can open a new terminal window to use the CLI. You will need to log in to authorize the client first:
chainlink admin login(You can also set ADMIN_CREDENTIALS_FILE=/path/to/credentials/file in future if you like, to avoid having to login again).
Now you can view your current jobs with:
chainlink jobs listTo find out more about the Chainlink CLI, you can always run chainlink help.
Check out the doc pages on Jobs to learn more about how to create Jobs.
Node configuration is managed by a combination of environment variables and direct setting via API/UI/CLI.
Check the official documentation for more information on how to configure your node.
External adapters are what make Chainlink easily extensible, providing simple integration of custom computations and specialized APIs. A Chainlink node communicates with external adapters via a simple REST API.
For more information on creating and using external adapters, please see our external adapters page.
We use cosign with OIDC keyless signing during the Build, Sign and Publish Chainlink workflow.
It is encourage for any node operator building from the official Chainlink docker image to verify the tagged release version was did indeed built from this workflow.
You will need cosign in order to do this verification. Follow the instruction here to install cosign.
# tag is the tagged release version - ie. 2.16.0
cosign verify index.docker.io/smartcontract/chainlink:${tag} \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity "https://github.com/smartcontractkit/chainlink/.github/workflows/build-publish.yml@refs/tags/v${tag}"Optionally install Git hooks with Lefthook to automatically catch lint errors, secrets, and typos before committing or pushing.
# Install lefthook with asdf or mise, or directly: https://lefthook.dev/install/
# Activate lefthook
lefthook install
git commit -m "commit message" # pre-commit hooks will run against changes, checking for linting issues and typos
git push # pre-push hooks will run minimal unit tests before activating CI
# Optionally use the `--no-verify` flag to disable githooks for specific commits/pushes
git commit -m "commit message" --no-verify
git push --no-verify
# Or use LEFTHOOK=0
LEFTHOOK=0 gh stack pushNote: Hooks help you catch issues before pushing to CI. They're meant to be quick, local checks to stop common mistakes and oversights. They are neither exhaustive or mandatory. CI is the ultimate, mandatory source of authority on code quality checks.
Use make test which handles most of the test DB setup for you in plain go (see tools/test/README.md for details).
make test ARGS="-h" # See full capabilities of the test harness
make test ARGS="./core/..." # Setup ephemeral test DB and run all tests in ./core
# Re-run tests in full isolation and get detailed stats to root out flakes and races
make test ARGS="diagnose --iterations 5 --parallel-iterations 3 -- ./core/config/..."Install gencodec and jq to be able to run go generate ./... and make abigen
Install mockery
# Using the `make` command will install the correct version.
make mockeryGenerate and compile static assets:
make generatePrepare your development environment
The tests require a postgres database. In turn, the environment variable
CL_DATABASE_URL must be set to value that can connect to _test database, and the user must be able to create and drop
the given _test database.
Note: Other environment variables should not be set for all tests to pass
There helper script for initial setup to create an appropriate test user. It requires postgres to be running on localhost at port 5432. You will be prompted for
the postgres user password
make setup-testdbThis script will save the CL_DATABASE_URL in .dbenv
Changes to database require migrations to be run. Similarly, pull'ing the repo may require migrations to run.
After the one-time setup above:
source .dbenv
make testdbIf you encounter the error database accessed by other users (SQLSTATE 55006) exit status 1
and you want force the database creation then use
source .dbenv
make testdb-forceRun tests:
go test ./...parallel flag can be used to limit CPU usage, for running tests in the background (-parallel=4) -[SMRT] Solana Mainnet CCIP Fee Quoter deployed ELF provenance
[NODE] Node crashes on startup when AuditLogger is enabled
keeper sync passes nil context to on-chain RPC calls
[SMRT] VRF v2.5: Cannot cancel subscription due to stuck 'Invalid key hash' request from Nov 2025
Documentation: Add integration example for Chainlink CCIP with Python scripts
Offering a free security review — no strings attached
[NODE] <Error while doing make install>
Production use case: Chainlink Automation for AI agent economy distribution on Arbitrum One
[NODE] Change minimum reward to be able to depend on gas prices
[CRE] Confidential workflow execution