Node of the decentralized oracle network, bridging on and off-chain computation

Overview

Chainlink logo


GitHub tag (latest SemVer) GitHub license GitHub workflow changelog CircleCI build GitHub contributors GitHub commit activity

Chainlink is middleware to simplify communication with blockchains. Here you'll find the Chainlink Golang node, currently in alpha. This initial implementation is intended for use and review by developers, and will go on to form the basis for Chainlink's decentralized oracle network. Further development of the Chainlink Node and Chainlink Network will happen here, if you are interested in contributing please see our contribution guidelines.

Features

  • easy connectivity of on-chain contracts to any off-chain computation or API
  • multiple methods for scheduling both on-chain and off-chain computation for a user's smart contract
  • automatic gas price bumping to prevent stuck transactions, assuring your data is delivered in a timely manner
  • push notification of smart contract state changes to off-chain systems, by tracking Ethereum logs
  • translation of various off-chain data types into EVM consumable types and transactions
  • easy to implement smart contract libraries for connecting smart contracts directly to their preferred oracles
  • easy to install node, which runs natively across operating systems, blazingly fast, and with a low memory footprint

Examples of how to utilize and integrate Chainlinks can be found in the Chainlink Truffle Box.

Community

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.

Install

  1. Install Go 1.17, and add your GOPATH's bin directory to your PATH
    • Example Path for macOS export PATH=$GOPATH/bin:$PATH & export GOPATH=/Users/$USER/go
  2. Install NodeJS 12.22 & Yarn
    • It might be easier long term to use nvm to switch between node versions for different projects: nvm install 12.22 && nvm use 12.22
  3. Install Postgres (>= 11.x).
  4. Download Chainlink: git clone https://github.com/smartcontractkit/chainlink && cd chainlink
  5. Build and install Chainlink: make install
    • If you got any errors regarding locked yarn package, try running yarn install before this step
    • If yarn install throws a network connection error, try increasing the network timeout by running yarn install --network-timeout 150000 before this step
  6. Run the node: chainlink help

Ethereum Node Requirements

In 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:

Run

NOTE: By default, chainlink will run in TLS mode. For local development you can either disable this by setting CHAINLINK_DEV to true, or generate self signed certificates using tools/bin/self-signed-certs or manually.

To start your Chainlink node, simply run:

chainlink node start

By default this will start on port 6688, where it exposes a REST API.

Once your node has started, you can view your current jobs with:

chainlink jobs list

View details of a specific job with:

chainlink job show [$JOB_ID]

To 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.

Configure

You can configure your node's behavior by setting environment variables. All the environment variables can be found in the ConfigSchema struct of schema.go. You can also read the official documentation to learn the most up to date information on each of them. For every variable, default values get used if no corresponding environment variable is found.

Project Structure

Chainlink is a monorepo containing several logically separatable and relatable projects.

External Adapters

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.

Development Setup

For the latest information on setting up a development environment, see the guide here.

Build your current version

go build -o chainlink ./core/
  • Run the binary:
./chainlink

Test Core

  1. Install Yarn

  2. Install gencodec and jq to be able to run go generate ./... and make abigen

  3. Install mockery

make mockery

Using the make command will install the correct version.

  1. Build contracts:
yarn
yarn setup:contracts
  1. Generate and compile static assets:
go generate ./...
  1. Prepare your development environment:
export DATABASE_URL=postgresql://127.0.0.1:5432/chainlink_test?sslmode=disable
export CHAINLINK_DEV=true # I prefer to use direnv and skip this
  1. Drop/Create test database and run migrations:
go run ./core/main.go local db preparetest

If you do end up modifying the migrations for the database, you will need to rerun

  1. Run tests:
go test -parallel=1 ./...

Solidity Development

Inside the contracts/ directory:

  1. Install dependencies:
yarn
  1. Run tests:
yarn test

Use of Go Generate

Go generate is used to generate mocks in this project. Mocks are generated with mockery and live in core/internal/mocks.

Nix Flake

A flake is provided for use with the Nix package manager. It defines a declarative, reproducible development environment.

To use it:

  1. Nix has to be installed with flake support.
  2. Run nix develop. You will be put in shell containing all the dependencies. Alternatively, a direnv integration exists to automatically change the environment when cd-ing into the folder.
  3. Create a local postgres database:
cd $PGDATA/
initdb
pg_ctl -l $PGDATA/postgres.log -o "--unix_socket_directories='$PWD'" start
createdb chainlink_test -h localhost
createuser --superuser --no-password chainlink -h localhost
  1. Start postgres, pg_ctl -l $PGDATA/postgres.log -o "--unix_socket_directories='$PWD'" start

Now you can run tests or compile code as usual.

Development Tips

For more tips on how to build and test Chainlink, see our development tips page.

Contributing

Chainlink's source code is licensed under the MIT License, and contributions are welcome.

Please check out our contributing guidelines for more details.

Thank you!

License

MIT

Issues
  • [merged] Implements `DeleteBridge` mutation

    [merged] Implements `DeleteBridge` mutation

    Closes: https://app.shortcut.com/chainlinklabs/story/20880/implement-delete-bridge-gql-mutation

    This aims to create a mutation that will allow the deletion of bridges by name.

    S-waiting-on-author merged-by-homu 
    opened by vyzaldysanchez 44
  • new config docs

    new config docs

    Generated Docs for new TOML config https://app.shortcut.com/chainlinklabs/story/33616/automatically-generated-documentation-for-new-configuration-struct-for-config-toml https://app.shortcut.com/chainlinklabs/story/43194/toml-support-units-for-wei-fields https://app.shortcut.com/chainlinklabs/story/11091/chain-configs-might-want-to-move-to-toml-json-files

    It is currently generating MarkDown to match docs.chain.link, which is directly usable in both repos.

    • [x] TOML source of truth (core/services/chainlink/cmd/doc/config.toml)
    • [x] auto generated MarkDown (make config > https://github.com/smartcontractkit/chainlink/blob/sc-33616-config-doc/docs/CONFIG.md)
    • [x] test failure if docs are out of date or invalid
    Example Error
    $ make config-docs 
    go run ./internal/config/docs/main.go > ./docs/CONFIG.md
    invalid config docs: 196 errors:
            - Database.TriggerFallbackDBPollInterval: missing description
            - Database.TriggerFallbackDBPollInterval: is neither a "# Default" or "# Example"
            - Database.Backup.OnVersionUpgrade: missing description
            - Database.Backup.OnVersionUpgrade: is neither a "# Default" or "# Example"
            - Database.Backup.URL: is neither a "# Default" or "# Example"
    ...
            - Terra.MaxMsgsPerBatch: is neither a "# Default" or "# Example"
            - Terra.OCR2CachePollPeriod: missing description
            - Terra.OCR2CachePollPeriod: is neither a "# Default" or "# Example"
            - Terra.OCR2CacheTTL: missing description
            - Terra.OCR2CacheTTL: is neither a "# Default" or "# Example"
            - Terra.TxMsgTimeout: missing description
            - Terra.TxMsgTimeout: is neither a "# Default" or "# Example"
            - Terra.Nodes.Name: missing description
            - Terra.Nodes.Name: is neither a "# Default" or "# Example"
            - Terra.Nodes.TendermintURL: missing description
            - Terra.Nodes.TendermintURL: is neither a "# Default" or "# Example"
            - Terra.Nodes.Name: missing description
            - Terra.Nodes.Name: is neither a "# Default" or "# Example"
            - Terra.Nodes.TendermintURL: missing description
            - Terra.Nodes.TendermintURL: is neither a "# Default" or "# Example"
            - Terra.Nodes.Name: missing description
            - Terra.Nodes.Name: is neither a "# Default" or "# Example"
            - Terra.Nodes.TendermintURL: missing description
            - Terra.Nodes.TendermintURL: is neither a "# Default" or "# Example"
    exit status 1
    make: *** [GNUmakefile:111: config-docs] Error 1
    
    • [x] all docs from docs.chain.link copied (https://github.com/smartcontractkit/documentation/blob/main/docs/Node%20Operators/configuration-variables.md?plain=1)
    • [x] all fields documented: ~50 remaining (:shrug: :detective:)~
    • [x] include chain specific defaults somehow (list of collapsible <details><summary> panels? example: https://github.com/smartcontractkit/chainlink/pull/6730/files#r891156386)
    • [ ] ~test to validate default values (and example values if no default)~ deferred until we have proper default initialization with https://app.shortcut.com/chainlinklabs/story/33615/create-new-implementation-of-chainscopedconfig-generalconfig-interfaces-that-sources-config-from-a-config-toml-file
    • [x] test for complete coverage (all fields included)
    Example Errors
    --- FAIL: TestDoc (0.00s)
        docs_test.go:26: Docs contain extra fields: undecoded keys: ["Database.Backup.Freqeuncy" "FMDefaultTransactionQueueDepth" "FMSimulateTransactions" "JobPipeline.DefaultHTTPRequestLimit" "JobPipeline.FeatureExternalInitiators" "P2P.V1.BootstrapPeers" "P2P.V2.Bootstrappers" "WebServer.AuthenticatedRateLimit" "WebServer.AuthenticatedRateLimitPeriod" "WebServer.Port" "WebServer.TLS.TLSCertPath" "WebServer.TLS.TLSHost" "WebServer.TLS.TLSKeyPath" "WebServer.TLS.TLSPort" "WebServer.TLS.TLSRedirect" "WebServer.UnAuthenticatedRateLimit" "WebServer.UnAuthenticatedRateLimitPeriod"]
        docs_test.go:32: 
                    Error Trace:    docs_test.go:32
                    Error:          Received unexpected error:
                                    the following errors occurred:
                                     -  Database.Backup.Frequency: missing from documentation
                                     -  WebServer.HTTPPort: missing from documentation
                                     -  WebServer.RateLimit: missing from documentation
                                     -  WebServer.TLS.CertPath: missing from documentation
                                     -  WebServer.TLS.ForceRedirect: missing from documentation
                                     -  WebServer.TLS.Host: missing from documentation
                                     -  WebServer.TLS.HTTPSPort: missing from documentation
                                     -  WebServer.TLS.KeyPath: missing from documentation
                                     -  JobPipeline.ExternalInitiatorsEnabled: missing from documentation
                                     -  JobPipeline.HTTPRequestMaxSizeBytes: missing from documentation
                                     -  FluxMonitor: missing from documentation
                                     -  OCR.TraceLogging: missing from documentation
                                     -  P2P.V1.DefaultBootstrapPeers: missing from documentation
                                     -  P2P.V2.DefaultBootstrappers: missing from documentation
                                     -  EVM.Enabled: missing from documentation
                                     -  EVM.GasBumpThreshold: missing from documentation
                                     -  EVM.GasLimitTransfer: missing from documentation
                                     -  EVM.OCRObservationTimeout: missing from documentation
                                     -  EVM.Nodes.SendOnly: missing from documentation
                                     -  EVM.Nodes.SendOnly: missing from documentation
                                     -  EVM.Nodes.WSURL: missing from documentation
                                     -  Terra.Enabled: missing from documentation
                    Test:           TestDoc
                    Messages:       
                                            - Database.Backup.Frequency: missing from documentation
                                            - WebServer.HTTPPort: missing from documentation
                                            - WebServer.RateLimit: missing from documentation
                                            - WebServer.TLS.CertPath: missing from documentation
                                            - WebServer.TLS.ForceRedirect: missing from documentation
                                            - WebServer.TLS.Host: missing from documentation
                                            - WebServer.TLS.HTTPSPort: missing from documentation
                                            - WebServer.TLS.KeyPath: missing from documentation
                                            - JobPipeline.ExternalInitiatorsEnabled: missing from documentation
                                            - JobPipeline.HTTPRequestMaxSizeBytes: missing from documentation
                                            - FluxMonitor: missing from documentation
                                            - OCR.TraceLogging: missing from documentation
                                            - P2P.V1.DefaultBootstrapPeers: missing from documentation
                                            - P2P.V2.DefaultBootstrappers: missing from documentation
                                            - EVM.Enabled: missing from documentation
                                            - EVM.GasBumpThreshold: missing from documentation
                                            - EVM.GasLimitTransfer: missing from documentation
                                            - EVM.OCRObservationTimeout: missing from documentation
                                            - EVM.Nodes.SendOnly: missing from documentation
                                            - EVM.Nodes.SendOnly: missing from documentation
                                            - EVM.Nodes.WSURL: missing from documentation
                                            - Terra.Enabled: missing from documentation
    FAIL
    FAIL    github.com/smartcontractkit/chainlink/internal/config   0.060s
    FAIL
    
    • [x] add a guide? internal/config/README.md
    ready for review 
    opened by jmank88 37
  • [merged] Hard panic everywhere; scheduler timeout for pipeline run

    [merged] Hard panic everywhere; scheduler timeout for pipeline run

    Recovering panics in the pipeline can lead to inconsistent state and hang the pipeline indefinitely. It is better to hard panic immediately and allow the node to be cleanly restarted.

    In addition, the pipeline runner should have some kind of sanity timeout. This commit re-adds a deadline for JobPipelineMaxRunDuration which appears to have been removed by accident at some point.


    The second commit completely removes WrapRecover and adds hard panics everywhere.

    Recover-ing gives illusion of safety but in reality it makes things more dangerous.

    In almost all cases its safer to hard panic the node than try to recover and keep going since panicking can leave things in an unknown state.

    Node operators typically run with auto-restart enabled, if the node panics it will be booted again from a clean state, and we immediately get a clear stacktrace of where the problem is.

    We have seen bugs that would have been uncovered much sooner and caused fewer problems if we had not suppressed the panic.

    There is one and only one case I can think of where recovering panics is acceptable, and that is in database transactions where it can be intercepted in order to rollback the transaction, then re-panicked again - and even that must be done very carefully with an additional panic added with a timeout in case the rollback hangs.

    merged-by-homu 
    opened by samsondav 21
  • Bump github.com/gagliardetto/solana-go from 1.0.4 to 1.4.0

    Bump github.com/gagliardetto/solana-go from 1.0.4 to 1.4.0

    Bumps github.com/gagliardetto/solana-go from 1.0.4 to 1.4.0.

    Release notes

    Sourced from github.com/gagliardetto/solana-go's releases.

    v1.4.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/gagliardetto/solana-go/compare/v1.3.0...v1.4.0

    v1.3.0

    Full Changelog: https://github.com/gagliardetto/solana-go/compare/v1.2.1...v1.3.0

    v1.2.1

    Full Changelog: https://github.com/gagliardetto/solana-go/compare/v1.2.0...v1.2.1

    v1.2.0

    Full Changelog: https://github.com/gagliardetto/solana-go/compare/v1.1.0...v1.2.0

    v1.1.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/gagliardetto/solana-go/compare/v1.0.4...v1.1.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 19
  • Restyle Job Runs

    Restyle Job Runs

    For #163407115

    Used Typography from Activity for consistency.
    Overall, I think it looks similar to what the story has asked.


    PS: we need a monospace font (have to manually adjust width without it)

    opened by NavyAdmiral 18
  • Fix query args for upsert

    Fix query args for upsert

    Looks like we have too many query arguments for the query that inserts primary/secondary node information into the DB.

    Seeing this when running latest develop locally:

    2021-11-10T17:35:33.647-0500 [INFO]  Starting Chainlink Node unset at commit unset      cmd/local_client.go:55  SHA=unset Version=unset logger=boot 
    2021-11-10T17:35:33.647-0500 [WARN]  Chainlink is running in DEVELOPMENT mode. This is a security risk if enabled in production. cmd/local_client.go:58  logger=boot 
    2021/11/10 17:35:33 goose: no more migrations to run. current version: 84
    2021-11-10T17:35:33.722-0500 [INFO]  USE_LEGACY_ETH_ENV_VARS is on, upserting chain %s and replacing primary/send-only nodes. It is recommended to set USE_LEGACY_ETH_ENV_VARS=false on subsequent runs and use the API to administer chains/nodes instead evm/legacy.go:28        evmChainID=4 
    creating application: failed to upsert primary-0: expected 5 arguments, got 8
    

    Follow up to #5404 I think. Not sure how this was working before as the number of query arguments hasn't changed.

    merged-by-homu 
    opened by makramkd 17
  • move tests to chainlink-env, remove yaml configs and simplify tests and configuration

    move tests to chainlink-env, remove yaml configs and simplify tests and configuration

    Massive overhaul about how we are writing tests:

    • Removed networks.yaml framework.yaml, now only 3 env vars to configure
    • Can just configure client/chart as a table test now
    • Moved from helmenv to chainlink-env to allow more clear programmatic deployments written in Go
    opened by skudasov 16
  • WrapRecover: move to inside of loop in FluxMonitor, PeerStore, and VRF listeners; let pipeline panic

    WrapRecover: move to inside of loop in FluxMonitor, PeerStore, and VRF listeners; let pipeline panic

    Push gracefulpanic.WrapRecover calls down the stack to more tightly wrap panic sources, so that long running systems stay up and processing when individual units of work panic.

    -go gracefulpanic.WrapRecover(func() {
    +go func() {
      for {
    -    doWork()
    +    gracefulpanic.WrapRecover(doWork)
      }
    -})
    +}()
    

    Except for two places in the pipeline where recovery is removed.

    Also carrying over four commits from rc0.

    ready for review S-waiting-on-review 
    opened by jmank88 16
  • Source

    Source "smartcontractkit/[email protected]/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File not found

    Hi @PatrickAlphaC , I am still having this issue on Lottery.sol. I had before but just followed along with tutorial. Since its about new lesson section I tried all solutions that found on the internet but did not work.

    Lottery.sol

    //SPDX-License-Identifier: MIT
    
    pragma solidity ^0.6.6;
    
    import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
    
    contract Lottery {
        address payable[] public players;
        uint256 public usdEntryFree;
        AggregatorV3Interface internal ethUsdPriceFeed;
    
        constructor(_priceFeedAddress) public {
            usdEntryFree = 50 * (10**18);
            ethUsdPriceFeed = AggregatorV3Interface(_priceFeedAddress);
        }
    
        function enter() public payable {
            //50USD min
            players.push(msg.sender);
        }
    
        function getEntranceFee() public view returns (uint256) {}
    
        function startLottery() public {}
    
        function endLottery() public {}
    }
    
    

    brownie-config.yaml

    dependecies:
     - smartcontractkit/[email protected]
    
    compiler:
      solc:
       remappings:
         - '@chainlink=smartcontractkit/[email protected]'
         
         
         
    

    I have tried to remove "-" on remappings.

    I have tried to separate on AggregatorV3Interface on Lottery.sol

    I imported AggregatorV3.sol as a file to contracts

    I tried to change versions

    but still no luck. I am using Mac M1 - can it be the reason due to chip?

    question support 
    opened by mish1010 15
  • [NODE] GUI Blank Screen while TOML job is executing

    [NODE] GUI Blank Screen while TOML job is executing

    Description After creating a directrequest job, either a normal HTTP GET job, or one that uses a bridge/external adapter, the job creates successfully. However when a consumer contract then goes to use the job and you go to refresh the node GUI screen to see the job executing in real-time, the GUI returns a blank screen. Once the job has completed and finished executing (whether successfully or failure), you can refresh the screen again and the GUI will resume, and you can see the job output

    Basic Information [replace this line with basic information about the issue you are experiencing, including but not limited to all relevant logs and any other relevant information, such as if you are using a Docker container to run the node, job specification, oracle contract address, transaction IDs, etc.]

    • Network: Kovan
    • Blockchain Client: Infura
    • Go Version: 1.17
    • Operating System: MacOs
    • Node Version: 1.0.0

    Steps to Reproduce

    • Spin up v.1.0.0 node, deploy oracle.sol and set fulfill permission to the node address
    • Create a new directrequest TOML job, as per the example below
    • Create a new consumer contract in remix that uses the created job and deployed oracle contract, as per the example below
    • Execute the requestEthereumPrice function on the deployed contract, passing in the oracle contract address and jobId
    • Go back to the GUI and try go to the job runs screen. While the job is executing the GUI will return a blank screen. Even if you go to another page (like the node homepage), nothing will show up on the GUI
    • Wait 30 seconds until the job has completed, then refresh the GUI screen, you should now see the GUI again

    Additional Information

    Error message in node console:

    2021-10-20T13:00:34Z [DEBUG] HeadTracker: Received new head #27835174 (0x1a8bb26) headtracker/head_listener.go:147 blockHash=0x4a93e3c4929f8020e72fd22b669b823f2460d53d1f4c17195e66f05c14b89109 blockHeight=27835174 logger=head_tracker parentHeadHash=0x0cde80a95131ae26500322a8487da6fa3e1a2a54f87ed4e30f70f0c88f0db7fa 
    2021-10-20T13:00:35Z [INFO]  New ETH balance for 0xF8DaCFFe864D900C5Dd99576578Ee066086D5a70: 0.999247024000000000 services/balance_monitor.go:166 address=0xF8DaCFFe864D900C5Dd99576578Ee066086D5a70 chainId=42 ethBalance=0.999247024000000000 id=balance_log weiBalance=999247024000000000 
    2021-10-20T13:00:36Z [INFO]  GET /v2/jobs                                       web/router.go:430       clientIP=::1 latency=9.485323ms method=GET path=/v2/jobs servedAt=2021-10-20 23:30:36 status=200 
    2021-10-20T13:00:37Z [ERROR] PipelineRunResource: unable to process output type <nil> presenters/pipeline_run.go:131 stacktrace=github.com/smartcontractkit/chainlink/core/web/presenters.NewPipelineRunResources
    	/Users/pappas99/GitHub/chainlink/core/web/presenters/pipeline_run.go:131
    github.com/smartcontractkit/chainlink/core/web.(*PipelineRunsController).Index
    	/Users/pappas99/GitHub/chainlink/core/web/pipeline_runs_controller.go:60
    github.com/smartcontractkit/chainlink/core/web.paginatedRequest.func1
    	/Users/pappas99/GitHub/chainlink/core/web/helpers.go:88
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/smartcontractkit/chainlink/core/web.RequireAuth.func1
    	/Users/pappas99/GitHub/chainlink/core/web/authentication.go:131
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/gin-gonic/contrib/sessions.Sessions.func1
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/sessions/sessions.go:65
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/ulule/limiter/drivers/middleware/gin.(*Middleware).Handle
    	/Users/pappas99/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:57
    github.com/ulule/limiter/drivers/middleware/gin.NewMiddleware.func1
    	/Users/pappas99/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:33
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/Depado/ginprom.(*Prometheus).Instrument.func1
    	/Users/pappas99/go/pkg/mod/github.com/!depado/[email protected]/prom.go:215
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/smartcontractkit/chainlink/core/web.loggerFunc.func1
    	/Users/pappas99/GitHub/chainlink/core/web/router.go:427
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/gin-contrib/size.RequestSizeLimiter.func1
    	/Users/pappas99/go/pkg/mod/github.com/gin-contrib/[email protected]/size.go:88
    github.com/gin-gonic/gin.(*Context).Next
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
    github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489
    github.com/gin-gonic/gin.(*Engine).ServeHTTP
    	/Users/pappas99/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445
    net/http.serverHandler.ServeHTTP
    	/usr/local/go/src/net/http/server.go:2878
    net/http.(*conn).serve
    	/usr/local/go/src/net/http/server.go:1929 
    2021-10-20T13:00:37Z [INFO]  GET /v2/jobs/15/runs                               web/router.go:430       clientIP=::1 latency=6.293717ms method=GET path=/v2/jobs/15/runs query=page=1&size=5 servedAt=2021-10-20 23:30:37 status=200 
    2021-10-20T13:00:37Z [INFO]  GET /v2/jobs/15                                    web/router.go:430       clientIP=::1 latency=8.556668ms method=GET path=/v2/jobs/15 servedAt=2021-10-20 23:30:37 status=200 
    

    This is semi related to other blank screen GUI issues https://github.com/smartcontractkit/chainlink/issues/4964 and https://github.com/smartcontractkit/chainlink/issues/4882

    TOML spec to reproduce issue:

    type = "directrequest"
    schemaVersion = 1
    name = "Get > Uint256-2"
    contractAddress = "0xA74F1E1Bb6204B9397Dac33AE970E68F8aBC7651"
    maxTaskDuration = "0s"
    observationSource = """
        decode_log   [type=ethabidecodelog
                      abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)"
                      data="$(jobRun.logData)"
                      topics="$(jobRun.logTopics)"]
    
        decode_cbor  [type=cborparse data="$(decode_log.data)"]
        fetch        [type=http method=GET url="$(decode_cbor.get)"]
        parse        [type=jsonparse path="$(decode_cbor.path)" data="$(fetch)"]
        multiply     [type=multiply input="$(parse)" times=100]     
        encode_data  [type=ethabiencode abi="(uint256 value)" data=<{ "value": $(multiply) }>]
        encode_tx    [type=ethabiencode
                      abi="fulfillOracleRequest(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data)"
                      data=<{"requestId": $(decode_log.requestId), "payment": $(decode_log.payment), "callbackAddress": $(decode_log.callbackAddr), "callbackFunctionId": $(decode_log.callbackFunctionId), "expiration": $(decode_log.cancelExpiration), "data": $(encode_data)}>
                     ]
        submit_tx    [type=ethtx to="0xA74F1E1Bb6204B9397Dac33AE970E68F8aBC7651" data="$(encode_tx)"]
    
        decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx
    """
    
    
    

    Consuming Solidity contract to reproduce issue

    investigating 
    opened by pappas999 15
  • `gasLimit` job attribute

    `gasLimit` job attribute

    Feature: https://app.shortcut.com/chainlinklabs/story/20502/allow-gas-limit-to-be-tuned-per-job-type-and-per-job-gas-savings

    Doc: https://github.com/smartcontractkit/documentation/pull/828

    ready for review 
    opened by pinebit 14
Releases(v1.6.0)
  • v1.6.0(Jul 20, 2022)

    Changed

    • After feedback from users, password complexity requirements have been simplified. These are the new, simplified requirements for any kind of password used with Chainlink:
    1. Must be 16 characters or more
    2. Must not contain leading or trailing whitespace
    3. User passwords must not contain the user's API email
    • Simplified the Keepers job spec by removing the observation source from the required parameters.
    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Jun 27, 2022)

    Fixed

    • Fix rare out-of-sync to invalid-chain-id transaction
    • Fix key-specific max gas limits for gas estimator and ensure we do not bump gas beyond key-specific limits
    • Fix EVM_FINALITY_DEPTH => ETH_FINALITY_DEPTH
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Jun 21, 2022)

    Changed

    • Chainlink will now fail to boot if the postgres database password is missing or too insecure. Passwords should conform to the following rules:
    Must be longer than 12 characters
    Must comprise at least 3 of:
    	lowercase characters
    	uppercase characters
    	numbers
    	symbols
    Must not comprise:
    	More than three identical consecutive characters
    	Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored)
    

    For backward compatibility all insecure passwords will continue to work, however in a future version of Chainlink insecure passwords will prevent application boot. To bypass this check at your own risk, you may set SKIP_DATABASE_PASSWORD_COMPLEXITY_CHECK=true.

    • MIN_OUTGOING_CONFIRMATIONS has been removed and no longer has any effect. EVM_FINALITY_DEPTH is now used as the default for ethtx confirmations instead. You may override this on a per-task basis by setting minConfirmations in the task definition e.g. foo [type=ethtx minConfirmations=42 ...]. NOTE: This may have a minor impact on performance on very high throughput chains. If you don't care about reporting task status in the UI, it is recommended to set minConfirmations=0 in your job specs. For more details, see the relevant section of the performance tuning guide.

    • The following ENV variables have been deprecated, and will be removed in a future release: INSECURE_SKIP_VERIFY, CLIENT_NODE_URL, ADMIN_CREDENTIALS_FILE. These vars only applied to Chainlink when running in client mode and have been replaced by command line args, notably: --insecure-skip-verify, --remote-node-url URL and --admin-credentials-file FILE respectively. More information can be found by running ./chainlink --help.

    • The Optimism2 GAS_ESTIMATOR_MODE has been renamed to L2Suggested. The old name is still supported for now.

    • The p2pBootstrapPeers property on OCR2 job specs has been renamed to p2pv2Bootstrappers.

    Added

    • Added ETH_USE_FORWARDERS config option to enable transactions forwarding contracts.
    • In job pipeline (direct request) the three new block variables are exposed:
      • $(jobRun.blockReceiptsRoot) : the root of the receipts trie of the block (hash)
      • $(jobRun.blockTransactionsRoot) : the root of the transaction trie of the block (hash)
      • $(jobRun.blockStateRoot) : the root of the final state trie of the block (hash)
    • ethtx tasks can now be configured to error if the transaction reverts on-chain. You must set failOnRevert=true on the task to enable this behavior, like so:

    foo [type=ethtx failOnRevert=true ...]

    So the ethtx task now works as follows:

    If minConfirmations == 0, task always succeeds and nil is passed as output If minConfirmations > 0, the receipt is passed through as output If minConfirmations > 0 and failOnRevert=true then the ethtx task will error on revert

    If minConfirmations is not set on the task, the chain default will be used which is usually 12 and always greater than 0.

    • http task now allows specification of request headers. Use like so: foo [type=http headers="[\\"X-Header-1\\", \\"value1\\", \\"X-Header-2\\", \\"value2\\"]"].

    Fixed

    • Fixed max_unconfirmed_age metric. Previously this would incorrectly report the max time since the last rebroadcast, capping the upper limit to the EthResender interval. This now reports the correct value of total time elapsed since the first broadcast.
    • Correctly handle the case where bumped gas would exceed the RPC node's configured maximum on Fantom (note that node operators should check their Fantom RPC node configuration and remove the fee cap if there is one)
    • Fixed handling of Metis internal fee change

    Removed

    • The Optimism OVM 1.0 GAS_ESTIMATOR_MODE has been removed.
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0-rc0(May 31, 2022)

    Changed

    • Chainlink will now fail to boot if the postgres database password is missing or too insecure. Passwords should conform to the following rules:
    Must be longer than 12 characters
    Must comprise at least 3 of:
    	lowercase characters
    	uppercase characters
    	numbers
    	symbols
    Must not comprise:
    	More than three identical consecutive characters
    	Leading or trailing whitespace
    

    For backward compatibility all insecure passwords will continue to work, however in a future version of Chainlink insecure passwords will prevent application boot.

    • MIN_OUTGOING_CONFIRMATIONS has been removed and no longer has any effect. EVM_FINALITY_DEPTH is now used as the default for ethtx confirmations instead. You may override this on a per-task basis by setting minConfirmations in the task definition e.g. foo [type=ethtx minConfirmations=42 ...]. NOTE: This may have a minor impact on performance on very high throughput chains. If you don't care about reporting task status in the UI, it is recommended to set minConfirmations=0 in your job specs. For more details, see the relevant section of the performance tuning guide.

    • The following ENV variables have been deprecated, and will be removed in a future release: INSECURE_SKIP_VERIFY, CLIENT_NODE_URL, ADMIN_CREDENTIALS_FILE. These vars only applied to Chainlink when running in client mode and have been replaced by command line args, notably: --insecure-skip-verify, --remote-node-url URL and --admin-credentials-file FILE respectively. More information can be found by running ./chainlink --help.

    • The Optimism2 GAS_ESTIMATOR_MODE has been renamed to L2Suggested. The old name is still supported for now.

    • The p2pBootstrapPeers property on OCR2 job specs has been renamed to p2pv2Bootstrappers.

    Added

    • Added ETH_USE_FORWARDERS config option to enable transactions forwarding contracts.
    • In job pipeline (direct request) the three new block variables are exposed:
      • $(jobRun.blockReceiptsRoot) : the root of the receipts trie of the block (hash)
      • $(jobRun.blockTransactionsRoot) : the root of the transaction trie of the block (hash)
      • $(jobRun.blockStateRoot) : the root of the final state trie of the block (hash)
    • ethtx tasks can now be configured to error if the transaction reverts on-chain. You must set failOnRevert=true on the task to enable this behavior, like so:

    foo [type=ethtx failOnRevert=true ...]

    So the ethtx task now works as follows:

    If minConfirmations == 0, task always succeeds and nil is passed as output If minConfirmations > 0, the receipt is passed through as output If minConfirmations > 0 and failOnRevert=true then the ethtx task will error on revert

    If minConfirmations is not set on the task, the chain default will be used which is usually 12 and always greater than 0.

    • http task now allows specification of request headers. Use like so: foo [type=http headers="[\\"X-Header-1\\", \\"value1\\", \\"X-Header-2\\", \\"value2\\"]"].

    Fixed

    • Fixed max_unconfirmed_age metric. Previously this would incorrectly report the max time since the last rebroadcast, capping the upper limit to the EthResender interval. This now reports the correct value of total time elapsed since the first broadcast.

    Removed

    • The Optimism OVM 1.0 GAS_ESTIMATOR_MODE has been removed.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(May 11, 2022)

    Fixed

    • Ensure failed EthSubscribe didn't register a (*rpc.ClientSubscription)(nil) which would lead to a panic on Unsubscribe
    • Fixes parsing of float values on job specs
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1-rc1(May 9, 2022)

    What's Changed

    • Fixes float parsing by @vyzaldysanchez in https://github.com/smartcontractkit/chainlink/pull/6575

    Full Changelog: https://github.com/smartcontractkit/chainlink/compare/v1.4.1-rc0...v1.4.1-rc1

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1-rc0(May 5, 2022)

  • v1.4.0(May 2, 2022)

    Added

    • JSON parse tasks (v2) now support a custom separator parameter to substitute for the default ,.
    • Log slow SQL queries
    • Fantom and avalanche block explorer urls
    • Display requestTimeout in job UI
    • Keeper upkeep order is shuffled

    Fixed

    • LOG_FILE_MAX_SIZE handling
    • Improved websocket subscription management (fixes issues with multiple-primary-node failover from 1.3.x)
    • VRFv2 fixes and enhancements
    • UI support for minContractPaymentLinkJuels
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Apr 18, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again. New environment variables related to this feature:
      • LOG_FILE_MAX_SIZE (default: 5120mb) - this env var allows you to override the log file's max size (in megabytes) before file rotation.
      • LOG_FILE_MAX_AGE (default: 0) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the log file's max age (in days) before file rotation. Keeping this config with the default value means not to remove old log files.
      • LOG_FILE_MAX_BACKUPS (default: 1) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the max amount of old log files to retain. Keeping this config with the default value means to retain 1 old log file at most (though LOG_FILE_MAX_AGE may still cause them to get deleted). If this is set to 0, the node will retain all old log files instead.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This gives the ability to specify multiple RPCs that the Chainlink node will constantly monitor for health and sync status, detecting dead nodes and out of sync nodes, with automatic failover. This is a temporary stand-in until configuration is overhauled and will be removed in future in favor of a config file. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL, ETH_SECONDARY_URL, ETH_CHAIN_ID etc). WARNING: Setting this environment variable will COMPLETELY ERASE your evm_nodes table on every boot and repopulate from the given data, nullifying any runtime modifications. Make sure to carefully read the EVM performance configuration guide for best practices here.

    For example:

    export EVM_NODES='
    [
    	{
    		"name": "primary_1",
    		"evmChainId": "137",
    		"wsUrl": "wss://endpoint-1.example.com/ws",
        "httpUrl": "http://endpoint-1.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_2",
    		"evmChainId": "137",
    		"wsUrl": "ws://endpoint-2.example.com/ws",
        "httpUrl": "http://endpoint-2.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_3",
    		"evmChainId": "137",
    		"wsUrl": "wss://endpoint-3.example.com/ws",
        "httpUrl": "http://endpoint-3.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1",
    		"evmChainId": "137",
    		"httpUrl": "http://endpoint-4.example.com/",
    		"sendOnly": true
    	},
      {
    		"name": "sendonly_2",
    		"evmChainId": "137",
    		"httpUrl": "http://endpoint-5.example.com/",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Removed

    • LOG_TO_DISK ENV var.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc5(Apr 13, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again. New environment variables related to this feature:
      • LOG_FILE_MAX_SIZE (default: 5120mb) - this env var allows you to override the log file's max size (in megabytes) before file rotation.
      • LOG_FILE_MAX_AGE (default: 0) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the log file's max age (in days) before file rotation. Keeping this config with the default value means not to remove old log files.
      • LOG_FILE_MAX_BACKUPS (default: 1) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the max amount of old log files to retain. Keeping this config with the default value means to retain 1 old log file at most (though LOG_FILE_MAX_AGE may still cause them to get deleted). If this is set to 0, the node will retain all old log files instead.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This gives the ability to specify multiple RPCs that the Chainlink node will constantly monitor for health and sync status, detecting dead nodes and out of sync nodes, with automatic failover. This is a temporary stand-in until configuration is overhauled and will be removed in future in favor of a config file. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL, ETH_SECONDARY_URL, ETH_CHAIN_ID etc). WARNING: Setting this environment variable will COMPLETELY ERASE your evm_nodes table on every boot and repopulate from the given data, nullifying any runtime modifications. Make sure to carefully read the EVM performance configuration guide for best practices here.

    For example:

    export EVM_NODES='
    [
    	{
    		"name": "primary_1",
    		"evmChainId": "137",
    		"wsUrl": "wss://endpoint-1.example.com/ws",
        "httpUrl": "http://endpoint-1.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_2",
    		"evmChainId": "137",
    		"wsUrl": "ws://endpoint-2.example.com/ws",
        "httpUrl": "http://endpoint-2.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_3",
    		"evmChainId": "137",
    		"wsUrl": "wss://endpoint-3.example.com/ws",
        "httpUrl": "http://endpoint-3.example.com/",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1",
    		"evmChainId": "137",
    		"httpUrl": "http://endpoint-4.example.com/",
    		"sendOnly": true
    	},
      {
    		"name": "sendonly_2",
    		"evmChainId": "137",
    		"httpUrl": "http://endpoint-5.example.com/",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Removed

    • LOG_TO_DISK ENV var.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc4(Apr 7, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcast.
    • Added version compatibility check when using CLI to log in to a remote node. flag bypass-version-check skips this check.
    • Interim solution to set multiple nodes/chains from ENV. This is a temporary stand-in until configuration is overhauled and will be removed in the future. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL etc).

    For example:

    EVM_NODES='
    [
    	{
    		"name": "primary_0_1",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_0_2",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"httpUrl": "https://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_1337_1",
    		"evmChainId": "1337",
    		"wsUrl": "ws://test2.invalid",
    		"httpUrl": "http://test2.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1337_1",
    		"evmChainId": "1337",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "sendonly_0_1",
    		"evmChainId": "0",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "primary_42_1",
    		"evmChainId": "42",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_43_1",
    		"evmChainId": "43",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in the future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended enabling this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    • The pipeline task runs have changed persistence protocol (database), which will result in inability to decode some existing task runs. All new runs should be working with no issues.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc3(Apr 1, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again. New environment variables related to this feature:
      • LOG_FILE_MAX_SIZE (default: 5120mb) - this env var allows you to override the log file's max size (in megabytes) before file rotation.
      • LOG_FILE_MAX_AGE (default: 0) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the log file's max age (in days) before file rotation. Keeping this config with the default value means not to remove old log files.
      • LOG_FILE_MAX_BACKUPS (default: 1) - if LOG_FILE_MAX_SIZE is set, this env var allows you to override the max amount of old log files to retain. Keeping this config with the default value means to retain 1 old log file at most (though LOG_FILE_MAX_AGE may still cause them to get deleted). If this is set to 0, the node will retain all old log files instead.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This is a temporary stand-in until configuration is overhauled and will be removed in future. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL etc). WARNING: Setting this environment variable will COMPLETELY ERASE your evm_nodes table on every boot and repopulate from the given data, nullifying any runtime modifications.

    For example:

    EVM_NODES='
    [
    	{
    		"name": "primary_0_1",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_0_2",
    		"evmChainId": "0",
    		"wsUrl": "ws://test2.invalid",
    		"httpUrl": "https://test3.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_1337_1",
    		"evmChainId": "1337",
    		"wsUrl": "ws://test4.invalid",
    		"httpUrl": "http://test5.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1337_1",
    		"evmChainId": "1337",
    		"httpUrl": "http://test6.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "sendonly_0_1",
    		"evmChainId": "0",
    		"httpUrl": "http://test7.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "primary_42_1",
    		"evmChainId": "42",
    		"wsUrl": "ws://test8.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_43_1",
    		"evmChainId": "43",
    		"httpUrl": "http://test9.invalid",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • It is now NOT allowed to have multiple evm RPC nodes specified with the same URL. If you see a migration error related to ERROR 0106_evm_node_uniqueness.sql: failed to run SQL migration that means you have multiple nodes specified with the same URL, and you must fix this before proceeding with the upgrade.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Removed

    • LOG_TO_DISK ENV var.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc2(Mar 30, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This is a temporary stand-in until configuration is overhauled and will be removed in future. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL etc). WARNING: Setting this environment variable will COMPLETELY ERASE your evm_nodes table on every boot and repopulate from the given data, nullifying any runtime modifications.

    For example:

    EVM_NODES='
    [
    	{
    		"name": "primary_0_1",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_0_2",
    		"evmChainId": "0",
    		"wsUrl": "ws://test2.invalid",
    		"httpUrl": "https://test3.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_1337_1",
    		"evmChainId": "1337",
    		"wsUrl": "ws://test4.invalid",
    		"httpUrl": "http://test5.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1337_1",
    		"evmChainId": "1337",
    		"httpUrl": "http://test6.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "sendonly_0_1",
    		"evmChainId": "0",
    		"httpUrl": "http://test7.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "primary_42_1",
    		"evmChainId": "42",
    		"wsUrl": "ws://test8.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_43_1",
    		"evmChainId": "43",
    		"httpUrl": "http://test9.invalid",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • It is now NOT allowed to have multiple evm RPC nodes specified with the same URL. If you see a migration error related to ERROR 0106_evm_node_uniqueness.sql: failed to run SQL migration that means you have multiple nodes specified with the same URL, and you must fix this before proceeding with the upgrade.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc1(Mar 25, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This is a temporary stand-in until configuration is overhauled and will be removed in future. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL etc).

    For example:

    EVM_NODES='
    [
    	{
    		"name": "primary_0_1",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_0_2",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"httpUrl": "https://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_1337_1",
    		"evmChainId": "1337",
    		"wsUrl": "ws://test2.invalid",
    		"httpUrl": "http://test2.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1337_1",
    		"evmChainId": "1337",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "sendonly_0_1",
    		"evmChainId": "0",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "primary_42_1",
    		"evmChainId": "42",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_43_1",
    		"evmChainId": "43",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-rc0(Mar 23, 2022)

    Added

    • Added disk rotating logs. Chainlink will now always log to disk at debug level. The default output directory for debug logs is Chainlink's root directory (ROOT_DIR) but can be configured by setting LOG_FILE_DIR. This makes it easier for node operators to report useful debugging information to Chainlink's team, since all the debug logs are conveniently located in one directory. Regular logging to STDOUT still works as before and respects the LOG_LEVEL env var. If you want to log in disk at a particular level, you can pipe STDOUT to disk. This automatic debug-logs-to-disk feature is enabled by default, and will remain enabled as long as the LOG_FILE_MAX_SIZE ENV var is set to a value greater than zero. The amount of disk space required for this feature to work can be calculated with the following formula: LOG_FILE_MAX_SIZE * (LOG_FILE_MAX_BACKUPS + 1). If your disk doesn't have enough disk space, the logging will pause and the application will log Errors until space is available again.
    • Added support for the force flag on chainlink blocks replay. If set to true, already consumed logs that would otherwise be skipped will be rebroadcasted.
    • Added version compatibility check when using CLI to login to a remote node. flag bypass-version-check skips this check.
    • Interrim solution to set multiple nodes/chains from ENV. This is a temporary stand-in until configuration is overhauled and will be removed in future. Set as such: EVM_NODES='{...}' where the var is a JSON array containing the node specifications. This is not compatible with using any other way to specify node via env (e.g. ETH_URL etc).

    For example:

    EVM_NODES='
    [
    	{
    		"name": "primary_0_1",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_0_2",
    		"evmChainId": "0",
    		"wsUrl": "ws://test1.invalid",
    		"httpUrl": "https://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "primary_1337_1",
    		"evmChainId": "1337",
    		"wsUrl": "ws://test2.invalid",
    		"httpUrl": "http://test2.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_1337_1",
    		"evmChainId": "1337",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "sendonly_0_1",
    		"evmChainId": "0",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	},
    	{
    		"name": "primary_42_1",
    		"evmChainId": "42",
    		"wsUrl": "ws://test1.invalid",
    		"sendOnly": false
    	},
    	{
    		"name": "sendonly_43_1",
    		"evmChainId": "43",
    		"httpUrl": "http://test1.invalid",
    		"sendOnly": true
    	}
    ]
    '
    

    Changed

    • Changed default locking mode to "dual". Bugs in lease locking have been ironed out and this paves the way to making "lease" the default in future. It is recommended to set DATABASE_LOCKING_MODE=lease, default is set to "dual" only for backwards compatibility.
    • EIP-1559 is now enabled by default on mainnet. To disable (go back to legacy mode) set EVM_EIP1559_DYNAMIC_FEES=false. The default settings should work well, but if you wish to tune your gas controls, see the documentation.

    Note that EIP-1559 can be manually enabled on other chains by setting EVM_EIP1559_DYNAMIC_FEES=true but we only support it for official Ethereum mainnet and testnets. It is not recommended to enable this setting on Polygon since during our testing process we found that the EIP-1559 fee market appears to be broken on all Polygon chains and EIP-1559 transactions are actually less likely to get included than legacy transactions.

    See issue: https://github.com/maticnetwork/bor/issues/347

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Mar 17, 2022)

    This release hotfixes issues from moving a new CI/CD system. Featurewise the functionality is the same as v1.2.0.

    Fixed

    • Fixed CI/CD issue where environment variables were not being passed into the underlying build
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1-rc0(Mar 17, 2022)

    This release hotfixes issues from moving a new CI/CD system. Featurewise the functionality is the same as v1.2.0.

    Fixed

    • Fixed CI/CD issue where environment variables were not being passed into the underlying build
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Mar 3, 2022)

    Added

    • Added support for the Nethermind Ethereum client.
    • Added support for batch sending telemetry to the ingress server to improve performance.
    • Added v2 P2P networking support (alpha)

    New ENV vars:

    • ADVISORY_LOCK_CHECK_INTERVAL (default: 1s) - when advisory locking mode is enabled, this controls how often Chainlink checks to make sure it still holds the advisory lock. It is recommended to leave this at the default.
    • ADVISORY_LOCK_ID (default: 1027321974924625846) - when advisory locking mode is enabled, the application advisory lock ID can be changed using this env var. All instances of Chainlink that might run on a particular database must share the same advisory lock ID. It is recommended to leave this at the default.
    • LOG_FILE_DIR (default: chainlink root directory) - if LOG_TO_DISK is enabled, this env var allows you to override the output directory for logging.
    • SHUTDOWN_GRACE_PERIOD (default: 5s) - when node is shutting down gracefully and exceeded this grace period, it terminates immediately (trying to close DB connection) to avoid being SIGKILLed.
    • SOLANA_ENABLED (default: false) - set to true to enable Solana support
    • TERRA_ENABLED (default: false) - set to true to enable Terra support
    • BLOCK_HISTORY_ESTIMATOR_EIP1559_FEE_CAP_BUFFER_BLOCKS - if EIP1559 mode is enabled, this optional env var controls the buffer blocks to add to the current base fee when sending a transaction. By default, the gas bumping threshold + 1 block is used. It is not recommended to change this unless you know what you are doing.
    • TELEMETRY_INGRESS_BUFFER_SIZE (default: 100) - the number of telemetry messages to buffer before dropping new ones
    • TELEMETRY_INGRESS_MAX_BATCH_SIZE (default: 50) - the maximum number of messages to batch into one telemetry request
    • TELEMETRY_INGRESS_SEND_INTERVAL (default: 500ms) - the cadence on which batched telemetry is sent to the ingress server
    • TELEMETRY_INGRESS_USE_BATCH_SEND (default: true) - toggles sending telemetry using the batch client to the ingress server

    Bootstrap job

    Added a new bootstrap job type. This job removes the need for every job to implement their own bootstrapping logic. OCR2 jobs with isBootstrapPeer=true are automatically migrated to the new format. The spec parameters are similar to a basic OCR2 job, an example would be:

    type            = "bootstrap"
    name            = "bootstrap"
    relay           = "evm"
    schemaVersion	= 1
    contractID      = "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"
    [relayConfig]
    chainID	        = 4
    

    Removed

    • deleteuser CLI command.

    Changed

    EVM_DISABLED has been deprecated and replaced by EVM_ENABLED for consistency with other feature flags. ETH_DISABLED has been deprecated and replaced by EVM_RPC_ENABLED for consistency, and because this was confusingly named. In most cases you want to set EVM_ENABLED=false and not EVM_RPC_ENABLED=false.

    Log colorization is now disabled by default because it causes issues when piped to text files. To re-enable log colorization, set LOG_COLOR=true.

    Polygon/matic defaults changed

    Due to increasingly hostile network conditions on Polygon we have had to increase a number of default limits. This is to work around numerous and very deep re-orgs, high mempool pressure and a failure by the network to propagate transactions properly. These new limits are likely to increase load on both your Chainlink node and database, so please be sure to monitor CPU and memory usage on both and make sure they are adequately specced to handle the additional load.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Feb 14, 2022)

    Added

    • BLOCK_HISTORY_ESTIMATOR_EIP1559_FEE_CAP_BUFFER_BLOCKS - if EIP1559 mode is enabled, this optional env var controls the buffer blocks to add to the current base fee when sending a transaction. By default, the gas bumping threshold + 1 block is used. It is not recommended to change this unless you know what you are doing.
    • EVM_GAS_FEE_CAP_DEFAULT - if EIP1559 mode is enabled, and FixedPrice gas estimator is used, this env var controls the fixed initial fee cap.

    Fixed

    Fixed issues with EIP-1559 related to gas bumping. Due to go-ethereum's implementation which introduces additional restrictions on top of the EIP-1559 spec, we must bump the FeeCap at least 10% each time in order for the gas bump to be accepted.

    The new EIP-1559 implementation works as follows:

    If you are using FixedPriceEstimator:

    • With gas bumping disabled, it will submit all transactions with feecap=ETH_MAX_GAS_PRICE_WEI and tipcap=EVM_GAS_TIP_CAP_DEFAULT
    • With gas bumping enabled, it will submit all transactions initially with feecap=EVM_GAS_FEE_CAP_DEFAULT and tipcap=EVM_GAS_TIP_CAP_DEFAULT.

    If you are using BlockHistoryEstimator (default for most chains):

    • With gas bumping disabled, it will submit all transactions with feecap=ETH_MAX_GAS_PRICE_WEI and tipcap=<calculated using past blocks>
    • With gas bumping enabled (default for most chains) it will submit all transactions initially with feecap=current block base fee * (1.125 ^ N) where N is configurable by setting BLOCK_HISTORY_ESTIMATOR_EIP1559_FEE_CAP_BUFFER_BLOCKS but defaults to gas bump threshold+1 and tipcap=<calculated using past blocks>

    Bumping works as follows:

    • Increase tipcap by max(tipcap * (1 + ETH_GAS_BUMP_PERCENT), tipcap + ETH_GAS_BUMP_WEI)
    • Increase feecap by max(feecap * (1 + ETH_GAS_BUMP_PERCENT), feecap + ETH_GAS_BUMP_WEI)
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jan 25, 2022)

    [1.1.0] - 2022-01-25

    Added

    • Added support for Sentry error reporting. Set SENTRY_DSN at compile- or run-time to enable reporting.
    • Added Prometheus counters: log_warn_count, log_error_count, log_critical_count, log_panic_count and log_fatal_count representing the corresponding number of warning/error/critical/panic/fatal messages in the log.
    • The new prometheus metric tx_manager_tx_attempt_count is a Prometheus Gauge that should represent the total number of Transactions attempts that awaiting confirmation for this node.
    • The new prometheus metric version that displays the node software version (tag) as well as the corresponding commit hash.
    • CLI command keys eth list is updated to display key specific max gas prices.
    • CLI command keys eth create now supports optional maxGasPriceGWei parameter.
    • CLI command keys eth update is added to update key specific parameters like maxGasPriceGWei.
    • Add partial support for Moonriver chain

    Two new log levels have been added.

    • [crit]: Critical level logs are more severe than [error] and require quick action from the node operator.
    • [debug] [trace]: Trace level logs contain extra [debug] information for development, and must be compiled in via -tags trace.

    [Beta] Multichain support added

    As a beta feature, Chainlink now supports connecting to multiple different EVM chains simultaneously.

    This means that one node can run jobs on Goerli, Kovan, BSC and Mainnet (for example). Note that you can still have as many eth keys as you like, but each eth key is pegged to one chain only.

    Extensive efforts have been made to make migration for existing nops as seamless as possible. Generally speaking, you should not have to make any changes when upgrading your existing node to this version. All your jobs will continue to run as before.

    The overall summary of changes is such:

    Chains/Ethereum Nodes

    EVM chains are now represented as a first class object within the chainlink node. You can create/delete/list them using the CLI or API.

    At least one primary node is required in order for a chain to connect. You may additionally specify zero or more send-only nodes for a chain. It is recommended to use the CLI/API or GUI to add nodes to chain.

    Creation
    chainlink chains evm create -id 42 # creates an evm chain with chain ID 42 (see: https://chainlist.org/)
    chainlink nodes create -chain-id 42 -name 'my-primary-kovan-full-node' -type primary -ws-url ws://node.example/ws -http-url http://node.example/rpc # http-url is optional but recommended for primaries
    chainlink nodes create -chain-id 42 -name 'my-send-only-backup-kovan-node' -type sendonly -http-url http://some-public-node.example/rpc
    
    Listing
    chainlink chains evm list
    chainlink nodes list
    
    Deletion
    chainlink nodes delete 'my-send-only-backup-kovan-node'
    chainlink chains evm delete 42
    
    Legacy eth ENV vars

    The old way of specifying chains using environment variables is still supported but discouraged. It works as follows:

    If you specify ETH_URL then the values of ETH_URL, ETH_CHAIN_ID, ETH_HTTP_URL and ETH_SECONDARY_URLS will be used to create/update chains and nodes representing these values in the database. If an existing chain/node is found it will be overwritten. This behavior is used mainly to ease the process of upgrading, and on subsequent runs (once your old settings have been written to the database) it is recommended to unset these ENV vars and use the API commands exclusively to administer chains and nodes.

    Jobs/tasks

    By default, all jobs/tasks will continue to use the default chain (specified by ETH_CHAIN_ID). However, the following jobs now allow an additional evmChainID key in their TOML:

    • VRF
    • DirectRequest
    • Keeper
    • OCR
    • Fluxmonitor

    You can pin individual jobs to a particular chain by specifying the evmChainID explicitly. Here is an example job to demonstrate:

    type            = "keeper"
    evmChainID      = 3
    schemaVersion   = 1
    name            = "example keeper spec"
    contractAddress = "0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba"
    externalJobID   = "0EEC7E1D-D0D2-476C-A1A8-72DFB6633F49"
    fromAddress     = "0xa8037A20989AFcBC51798de9762b351D63ff462e"
    

    The above keeper job will always run on chain ID 3 (Ropsten) regardless of the ETH_CHAIN_ID setting. If no chain matching this ID has been added to the chainlink node, the job cannot be created (you must create the chain first).

    In addition, you can also specify evmChainID on certain pipeline tasks. This allows for cross-chain requests, for example:

    type                = "directrequest"
    schemaVersion       = 1
    evmChainID          = 42
    name                = "example cross chain spec"
    contractAddress     = "0x613a38AC1659769640aaE063C651F48E0250454C"
    externalJobID       = "0EEC7E1D-D0D2-476C-A1A8-72DFB6633F90"
    observationSource   = """
        decode_log   [type=ethabidecodelog ... ]
        ...
        submit [type=ethtx to="0x613a38AC1659769640aaE063C651F48E0250454C" data="$(encode_tx)" minConfirmations="2" evmChainID="3"]
        decode_log-> ... ->submit;
    """
    

    In the example above (which excludes irrelevant pipeline steps for brevity) a log can be read from the chain with ID 42 (Kovan) and a transaction emitted on chain with ID 3 (Ropsten).

    Tasks that support the evmChainID parameter are as follows:

    • ethcall
    • estimategaslimit
    • ethtx
    Defaults

    If the job- or task-specific evmChainID is not given, the job/task will simply use the default as specified by the ETH_CHAIN_ID env variable.

    Generally speaking, the default config values for each chain are good enough. But in some cases it is necessary to be able to override the defaults on a per-chain basis.

    This used to be done via environment variables e.g. MINIMUM_CONTRACT_PAYMENT_LINK_JUELS.

    These still work, but if set they will override that value for all chains. This may not always be what you want. Consider a node that runs both Matic and Mainnet. You may want to set a higher value for MINIMUM_CONTRACT_PAYMENT on Mainnet, due to the more expensive gas costs. However, setting MINIMUM_CONTRACT_PAYMENT_LINK_JUELS using env variables will set that value for all chains including matic.

    To help you work around this, Chainlink now supports setting per-chain configuration options.

    Examples

    To set initial configuration when creating a chain, pass in the full json string as an optional parameter at the end:

    chainlink evm chains create -id 42 '{"BlockHistoryEstimatorBlockDelay": "100"}'

    To set configuration on an existing chain, specify key values pairs as such:

    chainlink evm chains configure -id 42 BlockHistoryEstimatorBlockDelay=100 GasEstimatorMode=FixedPrice

    The full list of chain-specific configuration options can be found by looking at the ChainCfg struct in core/chains/evm/types/types.go.

    Async support in external adapters

    External Adapters making async callbacks can now error job runs. This required a slight change to format, the correct way to callback from an asynchronous EA is using the following JSON:

    SUCCESS CASE:

    {
        "value": < any valid json object >
    }
    

    ERROR CASE:

    {
        "error": "some error string"
    }
    

    This only applies to EAs using the X-Chainlink-Pending header to signal that the result will be POSTed back to the Chainlink node sometime 'later'. Regular synchronous calls to EAs work just as they always have done.

    (NOTE: Official documentation for EAs needs to be updated)

    New optional VRF v2 field: requestedConfsDelay

    Added a new optional field for VRF v2 jobs called requestedConfsDelay, which configures a number of blocks to wait in addition to the request specified requestConfirmations before servicing the randomness request, i.e the Chainlink node will wait max(nodeMinConfs, requestConfirmations + requestedConfsDelay) blocks before servicing the request.

    It can be used in the following way:

    type = "vrf"
    externalJobID = "123e4567-e89b-12d3-a456-426655440001"
    schemaVersion = 1
    name = "vrf-v2-secondary"
    coordinatorAddress = "0xABA5eDc1a551E55b1A570c0e1f1055e5BE11eca7"
    requestedConfsDelay = 10
    # ... rest of job spec ...
    

    Use of this field requires a database migration.

    New locking mode: 'lease'

    Chainlink now supports a new environment variable DATABASE_LOCKING_MODE. It can be set to one of the following values:

    • dual (the default - uses both locking types for backwards and forwards compatibility)
    • advisorylock (advisory lock only)
    • lease (lease lock only)
    • none (no locking at all - useful for advanced deployment environments when you can be sure that only one instance of chainlink will ever be running)

    The database lock ensures that only one instance of Chainlink can be run on the database at a time. Running multiple instances of Chainlink on a single database at the same time would likely to lead to strange errors and possibly even data integrity failures and should not be allowed.

    Ideally, node operators would be using a container orchestration system (e.g. Kubernetes) that ensures that only one instance of Chainlink ever runs on a particular postgres database.

    However, we are aware that many node operators do not have the technical capacity to do this. So a common use case is to run multiple Chainlink instances in failover mode (as recommended by our official documentation, although this will be changing in future). The first instance will take some kind of lock on the database and subsequent instances will wait trying to take this lock in case the first instance disappears or dies.

    Traditionally Chainlink has used an advisory lock to manage this. However, advisory locks come with several problems, notably:

    • Postgres does not really like it when you hold locks open for a very long time (hours/days). It hampers certain internal cleanup tasks and is explicitly discouraged by the postgres maintainers.
    • The advisory lock can silently disappear on postgres upgrade, meaning that a new instance can take over even while the old one is still running.
    • Advisory locks do not play nicely with pooling tools such as pgbouncer.
    • If the application crashes, the advisory lock can be left hanging around for a while (sometimes hours) and can require manual intervention to remove it before another instance of Chainlink will allow itself to boot.

    For this reason, we have introduced a new locking mode, lease, which is likely to become the default in future. lease-mode works as follows:

    • Have one row in a database which is updated periodically with the client ID.
    • CL node A will run a background process on start that updates this e.g. once per second.
    • CL node B will spinlock, checking periodically to see if the update got too old. If it goes more than a set period without updating, it assumes that node A is dead and takes over. Now CL node B is the owner of the row and it updates this every second.
    • If CL node A comes back somehow, it will go to take out a lease and realise that the database has been leased to another process, so it will exit the entire application immediately.

    The default is set to dual which used both advisory locking AND lease locking, for backwards compatibility. However, it is recommended that node operators who know what they are doing, or explicitly want to stop using the advisory locking mode set DATABASE_LOCKING_MODE=lease in their env.

    Lease locking can be configured using the following ENV vars:

    LEASE_LOCK_REFRESH_INTERVAL (default 1s) LEASE_LOCK_DURATION (default 30s)

    It is recommended to leave these set to the default values.

    Duplicate Job Configuration

    When duplicating a job, the new job's configuration settings that have not been overridden by the user can still reflect the chainlink node configuration.

    Nurse (automatic pprof profiler)

    Added new automatic pprof profiling service. Profiling is triggered when the node exceeds certain resource thresholds (currently, memory and goroutine count). The following environment variables have been added to allow configuring this service:

    • AUTO_PPROF_ENABLED: Set to true to enable the automatic profiling service. Defaults to false.
    • AUTO_PPROF_PROFILE_ROOT: The location on disk where pprof profiles will be stored. Defaults to $CHAINLINK_ROOT.
    • AUTO_PPROF_POLL_INTERVAL: The interval at which the node's resources are checked. Defaults to 10s.
    • AUTO_PPROF_GATHER_DURATION: The duration for which profiles are gathered when profiling is kicked off. Defaults to 10s.
    • AUTO_PPROF_GATHER_TRACE_DURATION: The duration for which traces are gathered when profiling is kicked off. This is separately configurable because traces are significantly larger than other types of profiles. Defaults to 5s.
    • AUTO_PPROF_MAX_PROFILE_SIZE: The maximum amount of disk space that profiles may consume before profiling is disabled. Defaults to 100mb.
    • AUTO_PPROF_CPU_PROFILE_RATE: See https://pkg.go.dev/runtime#SetCPUProfileRate. Defaults to 1.
    • AUTO_PPROF_MEM_PROFILE_RATE: See https://pkg.go.dev/runtime#pkg-variables. Defaults to 1.
    • AUTO_PPROF_BLOCK_PROFILE_RATE: See https://pkg.go.dev/runtime#SetBlockProfileRate. Defaults to 1.
    • AUTO_PPROF_MUTEX_PROFILE_FRACTION: See https://pkg.go.dev/runtime#SetMutexProfileFraction. Defaults to 1.
    • AUTO_PPROF_MEM_THRESHOLD: The maximum amount of memory the node can actively consume before profiling begins. Defaults to 4gb.
    • AUTO_PPROF_GOROUTINE_THRESHOLD: The maximum number of actively-running goroutines the node can spawn before profiling begins. Defaults to 5000.

    Adventurous node operators are encouraged to read this guide on how to analyze pprof profiles.

    merge task type

    A new task type has been added, called merge. It can be used to merge two maps/JSON values together. Merge direction is from right to left such that right will clobber values of left. If no left is provided, it uses the input of the previous task. Example usage as such:

    decode_log   [type=ethabidecodelog ...]
    merge        [type=merge right=<{"foo": 42}>];
    
    decode_log -> merge;
    

    Or, to reverse merge direction:

    decode_log   [type=ethabidecodelog ...]
    merge        [type=merge left=<{"foo": 42}> right="$(decode_log)"];
    
    decode_log -> merge;
    

    Enhanced ABI encoding support

    The ethabiencode2 task supports ABI encoding using the abi specification generated by solc. e.g:

    {
        "name": "call",
        "inputs": [
          {
            "name": "value",
            "type": "tuple",
            "components": [
              {
                "name": "first",
                "type": "bytes32"
              },
              {
                "name": "last",
                "type": "bool"
              }
            ]
          }
        ]
    }
    

    This would allow for calling of a function call with a tuple containing two values, the first a bytes32 and the second a bool. You can supply a named map or an array.

    Transaction Simulation (Gas Savings)

    Chainlink now supports transaction simulation for certain types of job. When this is enabled, transactions will be simulated using eth_call before initial send. If the transaction would revert, the tx is marked as errored without being broadcast, potentially avoiding an expensive on-chain revert.

    This can add a tiny bit of latency (upper bound 2s, generally much shorter under good conditions) and will add marginally more load to the eth client, since it adds an extra call for every transaction sent. However, it may help to save gas in some cases especially during periods of high demand by avoiding unnecessary reverts (due to outdated round etc).

    This option is EXPERIMENTAL and disabled by default.

    To enable for FM or OCR:

    FM_SIMULATE_TRANSACTIONs=true OCR_SIMULATE_TRANSACTIONS=true

    To enable in the pipeline, use the simulate=true option like so:

    submit [type=ethtx to="0xDeadDeadDeadDeadDeadDeadDeadDead" data="0xDead" simulate=true]
    

    Use at your own risk.

    Misc

    Chainlink now supports more than one primary eth node per chain. Requests are round-robined between available primaries.

    Add CRUD functionality for EVM Chains and Nodes through Operator UI.

    Non fatal errors to a pipeline run are preserved including any run that succeeds but has more than one fatal error.

    Chainlink now supports configuring max gas price on a per-key basis (allows implementation of keeper "lanes").

    The Operator UI now supports login MFA with hardware security keys. MFA_RPID and MFA_RPORIGIN environment variables have been added to the config and are required if using the new MFA feature.

    Keys and Configuration navigation links have been moved into a settings dropdown to make space for multichain navigation links.

    Full EIP1559 Support (Gas Savings)

    Chainlink now includes experimental support for submitting transactions using type 0x2 (EIP-1559) envelope.

    EIP-1559 mode is off by default but can be enabled on a per-chain basis or globally.

    This may help to save gas on spikes: Chainlink ought to react faster on the upleg and avoid overpaying on the downleg. It may also be possible to set BLOCK_HISTORY_ESTIMATOR_BATCH_SIZE to a smaller value e.g. 12 or even 6 because tip cap ought to be a more consistent indicator of inclusion time than total gas price. This would make Chainlink more responsive and ought to reduce response time variance. Some experimentation will be needed here to find optimum settings.

    To enable globally, set EVM_EIP1559_DYNAMIC_FEES=true. Set with caution, if you set this on a chain that does not actually support EIP-1559 your node will be broken.

    In EIP-1559 mode, the total price for the transaction is the minimum of base fee + tip cap and fee cap. More information can be found on the official EIP.

    Chainlink's implementation of this is to set a large fee cap and modify the tip cap to control confirmation speed of transactions. So, when in EIP1559 mode, the tip cap takes the place of gas price roughly speaking, with the varying base price remaining a constant (we always pay it).

    A quick note on terminology - Chainlink uses the same terms used internally by go-ethereum source code to describe various prices. This is not the same as the externally used terms. For reference:

    Base Fee Per Gas = BaseFeePerGas Max Fee Per Gas = FeeCap Max Priority Fee Per Gas = TipCap

    In EIP-1559 mode, the following changes occur to how configuration works:

    • All new transactions will be sent as type 0x2 transactions specifying a TipCap and FeeCap (NOTE: existing pending legacy transactions will continue to be gas bumped in legacy mode)
    • BlockHistoryEstimator will apply its calculations (gas percentile etc) to the TipCap and this value will be used for new transactions (GasPrice will be ignored)
    • FixedPriceEstimator will use EVM_GAS_TIP_CAP_DEFAULT instead of ETH_GAS_PRICE_DEFAULT
    • ETH_GAS_PRICE_DEFAULT is ignored for new transactions and EVM_GAS_TIP_CAP_DEFAULT is used instead (default 20GWei)
    • ETH_MIN_GAS_PRICE_WEI is ignored for new transactions and EVM_GAS_TIP_CAP_MINIMUM is used instead (default 0)
    • ETH_MAX_GAS_PRICE_WEI controls the FeeCap
    • KEEPER_GAS_PRICE_BUFFER_PERCENT is ignored in EIP-1559 mode and KEEPER_TIP_CAP_BUFFER_PERCENT is used instead

    The default tip cap is configurable per-chain but can be specified for all chains using EVM_GAS_TIP_CAP_DEFAULT. The fee cap is derived from ETH_MAX_GAS_PRICE_WEI.

    When using the FixedPriceEstimator, the default gas tip will be used for all transactions.

    When using the BlockHistoryEstimator, Chainlink will calculate the tip cap based on transactions already included (in the same way it calculates gas price in legacy mode).

    Enabling EIP1559 mode might lead to marginally faster transaction inclusion and make the node more responsive to sharp rises/falls in gas price, keeping response times more consistent.

    In addition, ethcall tasks now accept gasTipCap and gasFeeCap parameters in addition to gasPrice. This is required for Keeper jobs, i.e.:

    check_upkeep_tx          [type=ethcall
                              failEarly=true
                              extractRevertReason=true
                              contract="$(jobSpec.contractAddress)"
                              gas="$(jobSpec.checkUpkeepGasLimit)"
                              gasPrice="$(jobSpec.gasPrice)"
                              gasTipCap="$(jobSpec.gasTipCap)"
                              gasFeeCap="$(jobSpec.gasFeeCap)"
                              data="$(encode_check_upkeep_tx)"]
    

    NOTE: AccessLists are part of the 0x2 transaction type spec and Chainlink also implements support for these internally. This is not currently exposed in any way, if there is demand for this it ought to be straightforward enough to do so.

    Avalanche AP4 defaults have been added (you can remove manually set ENV vars controlling gas pricing).

    New env vars

    CHAIN_TYPE - Configure the type of chain (if not standard). Arbitrum, ExChain, Optimism, or XDai. Replaces LAYER_2_TYPE. NOTE: This is a global override, to set on a per-chain basis you must use the CLI/API or GUI to change the chain-specific config for that chain (ChainType).

    BLOCK_EMISSION_IDLE_WARNING_THRESHOLD - Controls global override for the time after which node will start logging warnings if no heads are received.

    ETH_DEFAULT_BATCH_SIZE - Controls the default number of items per batch when making batched RPC calls. It is unlikely that you will need to change this from the default value.

    NOTE: ETH_URL used to default to "ws://localhost:8546" and ETH_CHAIN_ID used to default to 1. These defaults have now been removed. The env vars are no longer required, since node configuration is now done via CLI/API/GUI and stored in the database.

    Removed

    • belt/ and evm-test-helpers/ removed from the codebase.

    Deprecated env vars

    LAYER_2_TYPE - Use CHAIN_TYPE instead.

    Removed env vars

    FEATURE_CRON_V2, FEATURE_FLUX_MONITOR_V2, FEATURE_WEBHOOK_V2 - all V2 job types are now enabled by default.

    Fixed

    • Fixed a regression whereby the BlockHistoryEstimator would use a bumped value on old gas price even if the new current price was larger than the bumped value.
    • Fixed a bug where creating lots of jobs very quickly in parallel would cause the node to hang
    • Propagating evmChainID parameter in job specs supporting this parameter.

    Fixed LOG_LEVEL behavior in respect to the corresponding UI setting: Operator can override LOG_LEVEL until the node is restarted.

    Changed

    • The default GAS_ESTIMATOR_MODE for Optimism chains has been changed to Optimism2.
    • Default minimum payment on mainnet has been reduced from 1 LINK to 0.1 LINK.
    • Logging timestamp output has been changed from unix to ISO8601 to aid in readability. To keep the old unix format, you may set LOG_UNIX_TS=true
    • Added WebAuthn support for the Operator UI and corresponding support in the Go backend

    Log to Disk

    This feature has been disabled by default, turn on with LOG_TO_DISK. For most production uses this is not desirable.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Nov 23, 2021)

    Added

    • Improved error reporting
    • Panic and recovery improvements

    Fixed

    • Resolved config conversion errors for ETH_FINALITY_DEPTH, ETH_HEAD_TRACKER_HISTORY, and ETH_GAS_LIMIT_MULTIPLIER
    • Proper handling for "nonce too low" errors on Avalanche
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Oct 19, 2021)

    Added

    • chainlink node db status will now display a table of applied and pending migrations.
    • Add support for OKEx/ExChain.

    Changed

    Legacy job pipeline (JSON specs) are no longer supported

    This version will refuse to migrate the database if job specs are still present. You must manually delete or migrate all V1 job specs before upgrading.

    For more information on migrating, see the docs.

    This release will DROP legacy job tables so please take a backup before upgrading.

    New env vars

    LAYER_2_TYPE - For layer 2 chains only. Configure the type of chain, either Arbitrum or Optimism.

    Misc

    • Head sampling can now be optionally disabled by setting ETH_HEAD_TRACKER_SAMPLING_INTERVAL = "0s" - this will result in every new head being delivered to running jobs, regardless of the head frequency from the chain.
    • When creating new FluxMonitor jobs, the validation logic now checks that only one of: drumbeat ticker or idle timer is enabled.
    • Added a new Prometheus metric: uptime_seconds which measures the number of seconds the node has been running. It can be helpful in detecting potential crashes.

    Fixed

    Fixed a regression whereby the BlockHistoryEstimator would use a bumped value on old gas price even if the new current price was larger than the bumped value.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.15(Oct 14, 2021)

    It is highly recommended to upgrade to this version before upgrading to any newer versions to avoid any complications.

    Fixed

    • Prevent release from clobbering newer databases
    Source code(tar.gz)
    Source code(zip)
  • v0.10.14(Sep 7, 2021)

    Added

    • FMv2 spec now contains DrumbeatRandomDelay parameter that can be used to introduce variation between round of submits of different oracles, if drumbeat ticker is enabled.

    • OCR Hibernation

    Requesters/MinContractPaymentLinkJuels

    V2 direct request specs now support two additional keys:

    • "requesters" key which allows to whitelist requesters
    • "minContractPaymentLinkJuels" key which allows to specify a job-specific minimum contract payment.

    For example:

    type                        = "directrequest"
    schemaVersion               = 1
    requesters                  = ["0xaaaa1F8ee20f5565510B84f9353F1E333E753B7a", "0xbbbb70F0e81C6F3430dfdC9fa02fB22BdD818C4e"] # optional
    minContractPaymentLinkJuels = "100000000000000" # optional
    name                        = "example eth request event spec with requesters"
    contractAddress             = "..."
    externalJobID               = "..."
    observationSource           = """
    ...
    """
    
    Source code(tar.gz)
    Source code(zip)
  • v0.10.13(Aug 25, 2021)

  • v0.10.12(Aug 16, 2021)

    Fixed

    • Resolved FMv2 stalling in Hibernation mode
    • Resolved rare issue when the Gas Estimator fails on start
    • Resolved the handling of nil values for gas price
    Source code(tar.gz)
    Source code(zip)
  • v0.10.11(Aug 9, 2021)

    A new configuration variable, BLOCK_BACKFILL_SKIP, can be optionally set to "true" in order to strongly limit the depth of the log backfill. This is useful if the node has been offline for a longer time and after startup should not be concerned with older events from the chain.

    • Fixes the logging configuration form not displaying the current values
    • Updates the design of the configuration cards to be easier on the eyes
    • View Coordinator Service Authentication keys in the Operator UI. This is hidden behind a feature flag until usage is enabled.

    Changed

    The legacy job pipeline (JSON specs) has been officially deprecated and support for these jobs will be dropped in an upcoming release.

    Any node operators still running jobs with JSON specs should migrate their jobs to TOML format instead.

    The format for V2 Webhook job specs has changed. They now allow specifying 0 or more external initiators. Example below:

    type            = "webhook"
    schemaVersion   = 1
    externalInitiators = [
        { name = "foo-ei", spec = '{"foo": 42}' },
        { name = "bar-ei", spec = '{"bar": 42}' }
    ]
    observationSource   = """
    ds          [type=http method=GET url="https://chain.link/ETH-USD"];
    ds_parse    [type=jsonparse path="data,price"];
    ds_multiply [type=multiply times=100];
    ds -> ds_parse -> ds_multiply;
    """
    

    These external initiators will be notified with the given spec after the job is created, and also at deletion time.

    Only the External Initiators listed in the toml spec may trigger a run for that job. Logged in users can always trigger a run for any job.

    Migrating Jobs

    • OCR All OCR jobs are already using v2 pipeline by default - no need to do anything here.

    • Flux Monitor v1 We have created a tool to help you automigrate flux monitor specs in JSON format to the new TOML format. You can migrate a job like this:

    chainlink jobs migrate <job id>
    

    This can be automated by using the API like so:

    POST http://yournode.example/v2/migrate/<job id>
    
    • VRF v1 Automigration is not supported for VRF jobs. They must be manually converted into v2 format.

    • Ethlog/Runlog/Cron/web All other job types must also be manually converted into v2 format.

    Technical details

    Why are we doing this?

    To give some background, the legacy job pipeline has been around since before Chainlink went to mainnet and is getting quite long in the tooth. The code is brittle and difficult to understand and maintain. For a while now we have been developing a v2 job pipeline in parallel which uses the TOML format. The new job pipeline is simpler, more performant and more powerful. Every job that can be represented in the legacy pipeline should be able to be represented in the v2 pipeline - if it can't be, that's a bug, so please let us know ASAP.

    The v2 pipeline has now been extensively tested in production and proved itself reliable. So, we made the decision to drop V1 support entirely in favour of focusing developer effort on new features like native multichain support, EIP1559-compatible fees, further gas saving measures and support for more blockchains. By dropping support for the old pipeline, we can deliver these features faster and better support our community.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.10(Jul 26, 2021)

    Changed

    This update will truncate pipeline_runs, pipeline_task_runs, flux_monitor_round_stats_v2 DB tables as a part of the migration.

    Gas Estimation

    Gas estimation has been revamped and full support for Optimism has been added.

    The following env vars have been deprecated, and will be removed in a future release:

    GAS_UPDATER_ENABLED
    GAS_UPDATER_BATCH_SIZE
    GAS_UPDATER_BLOCK_DELAY
    GAS_UPDATER_BLOCK_HISTORY_SIZE
    GAS_UPDATER_TRANSACTION_PERCENTILE
    

    If you are using any of the env vars above, please switch to using the following instead:

    GAS_ESTIMATOR_MODE
    BLOCK_HISTORY_ESTIMATOR_BATCH_SIZE
    BLOCK_HISTORY_ESTIMATOR_BLOCK_DELAY
    BLOCK_HISTORY_ESTIMATOR_BLOCK_HISTORY_SIZE
    BLOCK_HISTORY_ESTIMATOR_TRANSACTION_PERCENTILE
    

    Valid values for GAS_ESTIMATOR_MODE are as follows:

    GAS_ESTIMATOR_MODE=BlockHistory (equivalent to GAS_UPDATER_ENABLED=true) GAS_ESTIMATOR_MODE=FixedPrice (equivalent to GAS_UPDATER_ENABLED=false) GAS_ESTIMATOR_MODE=Optimism (new)

    New gas estimator modes may be added in future.

    In addition, a minor annoyance has been fixed whereby previously if you enabled the gas updater, it would overwrite the locally stored value for gas price and continue to use this even if it was disabled after a reboot. This will no longer happen: BlockHistory mode will not clobber the locally stored value for fixed gas price, which can still be adjusted via remote API call or using chainlink config setgasprice XXX. In order to use this manually fixed gas price, you must enable FixedPrice estimator mode.

    Added

    Added support for latest version of libocr with the V2 networking stack. New env vars to configure this are:

    P2P_NETWORKING_STACK
    P2PV2_ANNOUNCE_ADDRESSES
    P2PV2_BOOTSTRAPPERS
    P2PV2_DELTA_DIAL
    P2PV2_DELTA_RECONCILE
    P2PV2_LISTEN_ADDRESSES
    

    All of these are currently optional, by default OCR will continue to use the existing V1 stack. The new env vars will be used internally for OCR testing.

    Fixed

    • Fix inability to create jobs with a cron schedule.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.9(Jul 6, 2021)

    Changed

    FMv2, Keeper and OCR jobs now use a new strategy for sending transactions. By default, if multiple transactions are queued up, only the latest one will be sent. This should greatly reduce the number of stale rounds and reverted transactions, and help node operators to save significant gas especially during times of high congestion or when catching up on a deep backlog.

    Defaults should work well, but it can be controlled if necessary using the following new env vars:

    FM_DEFAULT_TRANSACTION_QUEUE_DEPTH KEEPER_DEFAULT_TRANSACTION_QUEUE_DEPTH OCR_DEFAULT_TRANSACTION_QUEUE_DEPTH

    Setting to 0 will disable (the old behaviour). Setting to 1 (the default) will keep only the latest transaction queued up at any given time. Setting to 2, 3 etc will allow this many transactions to be queued before starting to drop older items.

    Note that it has no effect on FMv1 jobs. Node operators will need to upgrade to FMv2 to take advantage of this feature.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.8(Jun 21, 2021)

    Fixed

    • The HTTP adapter would remove a trailing slash on a subdirectory when specifying an extended path, so for instance http://example.com/subdir/ with a param of ?query= extended path would produce the URL http://example.com/subdir?query=, but should now produce: http://example.com/subdir/?query=.

    • Matic autoconfig is now enabled for mainnet. Matic nops should remove any custom tweaks they have been running with. In addition, we have better default configs for Optimism, Arbitrum and RSK.

    • It is no longer required to set DEFAULT_HTTP_ALLOW_UNRESTRICTED_NETWORK_ACCESS=true to enable local fetches on bridge tasks. Please remove this if you had it set and no longer need it, since it introduces a slight security risk.

    • Chainlink can now run with ETH_DISABLED=true without spewing errors everywhere

    • Removed prometheus metrics that were no longer valid after recent changes to head tracking: head_tracker_heads_in_queue, head_tracker_callback_execution_duration, head_tracker_callback_execution_duration_hist, head_tracker_num_heads_dropped

    Added

    • INSECURE_SKIP_VERIFY configuration variable disables verification of the Chainlink SSL certificates when using the CLI.

    • JSON parse tasks (v2) now permit an empty path parameter.

    • Eth->eth transfer gas limit is no longer hardcoded at 21000 and can now be adjusted using ETH_GAS_LIMIT_TRANSFER

    • HTTP and Bridge tasks (v2 pipeline) now log the request parameters (including the body) upon making the request when LOG_LEVEL=debug.

    • Webhook v2 jobs now support two new parameters, externalInitiatorName and externalInitiatorSpec. The v2 version of the following v1 spec:

      {
        "initiators": [
          {
            "type": "external",
            "params": {
              "name": "substrate",
              "body": {
                "endpoint": "substrate",
                "feed_id": 0,
                "account_id": "0x7c522c8273973e7bcf4a5dbfcc745dba4a3ab08c1e410167d7b1bdf9cb924f6c",
                "fluxmonitor": {
                  "requestData": {
                    "data": { "from": "DOT", "to": "USD" }
                  },
                  "feeds": [{ "url": "http://adapter1:8080" }],
                  "threshold": 0.5,
                  "absoluteThreshold": 0,
                  "precision": 8,
                  "pollTimer": { "period": "30s" },
                  "idleTimer": { "duration": "1m" }
                }
              }
            }
          }
        ],
        "tasks": [
          {
            "type": "substrate-adapter1",
            "params": { "multiply": 1e8 }
          }
        ]
      }
      

      is:

      type            = "webhook"
      schemaVersion   = 1
      jobID           = "0EEC7E1D-D0D2-475C-A1A8-72DFB6633F46"
      externalInitiatorName = "substrate"
      externalInitiatorSpec = """
          {
            "endpoint": "substrate",
            "feed_id": 0,
            "account_id": "0x7c522c8273973e7bcf4a5dbfcc745dba4a3ab08c1e410167d7b1bdf9cb924f6c",
            "fluxmonitor": {
              "requestData": {
                "data": { "from": "DOT", "to": "USD" }
              },
              "feeds": [{ "url": "http://adapter1:8080" }],
              "threshold": 0.5,
              "absoluteThreshold": 0,
              "precision": 8,
              "pollTimer": { "period": "30s" },
              "idleTimer": { "duration": "1m" }
            }
          }
      """
      observationSource   = """
          submit [type=bridge name="substrate-adapter1" requestData=<{ "multiply": 1e8 }>]
      """
      
    • Task definitions in v2 jobs (those with TOML specs) now support quoting strings with angle brackets (which DOT already permitted). This is particularly useful when defining JSON blobs to post to external adapters. For example:

      my_bridge [type=bridge name="my_bridge" requestData="{\\"hi\\": \\"hello\\"}"]
      

      ... can now be written as:

      my_bridge [type=bridge name="my_bridge" requestData=<{"hi": "hello"}>]
      

      Multiline strings are supported with this syntax as well:

      my_bridge [type=bridge
                 name="my_bridge"
                 requestData=<{
                     "hi": "hello",
                     "foo": "bar"
                 }>]
      
    • v2 jobs (those with TOML specs) now support variable interpolation in pipeline definitions. For example:

      fetch1    [type=bridge name="fetch"]
      parse1    [type=jsonparse path="foo,bar"]
      fetch2    [type=bridge name="fetch"]
      parse2    [type=jsonparse path="foo,bar"]
      medianize [type=median]
      submit    [type=bridge name="submit"
                 requestData=<{
                                "result": $(medianize),
                                "fetchedData": [ $(parse1), $(parse2) ]
                              }>]
      
      fetch1 -> parse1 -> medianize
      fetch2 -> parse2 -> medianize
      medianize -> submit
      

      This syntax is supported by the following tasks/parameters:

      • bridge
        • requestData
      • http
        • requestData
      • jsonparse
        • data (falls back to the first input if unspecified)
      • median
        • values (falls back to the array of inputs if unspecified)
      • multiply
        • input (falls back to the first input if unspecified)
        • times
    • Add ETH_MAX_IN_FLIGHT_TRANSACTIONS configuration option. This defaults to 16 and controls how many unconfirmed transactions may be in-flight at any given moment. This is set conservatively by default, node operators running many jobs on high throughput chains will probably need to increase this above the default to avoid lagging behind. However, before increasing this value, you MUST first ensure your ethereum node is configured not to ever evict local transactions that exceed this number otherwise your node may get permanently stuck. Set to 0 to disable the limit entirely (the old behaviour). Disabling this setting is not recommended.

    Relevant settings for geth (and forks e.g. BSC)

    [Eth.TxPool]
    Locals = ["0xYourNodeAddress1", "0xYourNodeAddress2"]  # Add your node addresses here
    NoLocals = false # Disabled by default but might as well make sure
    Journal = "transactions.rlp" # Make sure you set a journal file
    Rejournal = 3600000000000 # Default 1h, it might make sense to reduce this to e.g. 5m
    PriceBump = 10 # Must be set less than or equal to chainlink's ETH_GAS_BUMP_PERCENT
    AccountSlots = 16 # Highly recommended to increase this, must be greater than or equal to chainlink's ETH_MAX_IN_FLIGHT_TRANSACTIONS setting
    GlobalSlots = 4096 # Increase this as necessary
    AccountQueue = 64 # Increase this as necessary
    GlobalQueue = 1024 # Increase this as necessary
    Lifetime = 10800000000000 # Default 3h, this is probably ok, you might even consider reducing it
    
    

    Relevant settings for parity/openethereum (and forks e.g. xDai)

    NOTE: There is a bug in parity (and xDai) where occasionally local transactions are inexplicably culled. See: https://github.com/openethereum/parity-ethereum/issues/10228

    Adjusting the settings below might help.

    tx_queue_locals = ["0xYourNodeAddress1", "0xYourNodeAddress2"] # Add your node addresses here
    tx_queue_size = 8192 # Increase this as necessary
    tx_queue_per_sender = 16 # Highly recommended to increase this, must be greater than or equal to chainlink's ETH_MAX_IN_FLIGHT_TRANSACTIONS setting
    tx_queue_mem_limit = 4 # In MB. Highly recommended to increase this or set to 0
    tx_queue_no_early_reject = true # Recommended to set this
    tx_queue_no_unfamiliar_locals = false # This is disabled by default but might as well make sure
    
    • Keeper jobs now support prometheus metrics, they are considered a pipeline with a single keeper task type. Example:
    pipeline_run_errors{job_id="1",job_name="example keeper spec"} 1
    pipeline_run_total_time_to_completion{job_id="1",job_name="example keeper spec"} 8.470456e+06
    pipeline_task_execution_time{job_id="1",job_name="example keeper spec",task_type="keeper"} 8.470456e+06
    pipeline_tasks_total_finished{job_id="1",job_name="example keeper spec",status="completed",task_type="keeper"} 1
    

    Fixed

    • It is no longer required to set DEFAULT_HTTP_ALLOW_UNRESTRICTED_NETWORK_ACCESS=true to enable local fetches on bridge tasks. Please remove this if you had it set and no longer need it, since it introduces a slight security risk.
    • Chainlink can now run with ETH_DISABLED=true without spewing errors everywhere

    Changed

    • The v2 (TOML) bridge task's includeInputAtKey parameter is being deprecated in favor of variable interpolation. Please migrate your jobs to the new syntax as soon as possible.

    • Chainlink no longers writes/reads eth key files to disk

    • Add sensible default configuration settings for Fantom

    • Rename ETH_MAX_UNCONFIRMED_TRANSACTIONS to ETH_MAX_QUEUED_TRANSACTIONS. It still performs the same function but the name was misleading and would have caused confusion with the new ETH_MAX_IN_FLIGHT_TRANSACTIONS.

    Source code(tar.gz)
    Source code(zip)
Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Gabriel Iggy N. 9 May 21, 2022
Carbyne Stack serverless compute service for secure multiparty computation

Carbyne Stack Ephemeral Service Ephemeral is a serverless compute service for secure multiparty computation based on Knative, Istio and Kubernetes. DI

Carbyne Stack 9 Jun 17, 2022
Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call

speedex-standalone Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call. Notes from Geoff About Tato

Samuel Wong 1 Dec 1, 2021
A modular is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go.

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go. xlibp2p is made to be minimal, robust,

XFS Network 63 Jul 10, 2022
Renloi: a decentralized finance network for golang

Intro to Renloi A digital decentralized version of cash will allow extremely fas

null 1 Jun 9, 2022
Xlibp2p: an opinionated, easy-to-use P2P network stack for decentralized applications written in Go

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentraliz

null 2 Feb 21, 2022
Steve - A peer-to-peer (p2p) decentralized network

Steve Steve is a peer-to-peer (p2p) decentralized network that enables people to

Steve Care Software Inc 4 Feb 5, 2022
A simple Go library to toggle on and off pac(proxy auto configuration) for Windows, MacOS and Linux

pac pac is a simple Go library to toggle on and off pac(proxy auto configuration

null 0 Dec 26, 2021
Node for providing data into Orakuru network

Orakuru's crystal-ball Node for providing data into Orakuru network. Configuration Crystal-ball uses environment variables and configuration files for

null 8 Jan 20, 2022
A cross-platform, decentralized, chat app based on SaltyIM for functionality and GioUI for UI

This project is shifted at https://git.mills.io/saltyim/app Salty UI A cross-platform, decentralized, chat app based on SaltyIM for functionality and

MEARAJ BHAGAD 7 Jun 20, 2022
Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Matt Layher 42 Jul 3, 2022
Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Connecting the Next Billion People Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core

Magma 1.3k Jul 31, 2022
Zero Trust Network Communication Sentinel provides peer-to-peer, multi-protocol, automatic networking, cross-CDN and other features for network communication.

Thank you for your interest in ZASentinel ZASentinel helps organizations improve information security by providing a better and simpler way to protect

ZTALAB 6 Jul 30, 2022
Decentralized VPN in golang

LCVPN - Light decentralized VPN in golang Originally this repo was just an answer on a question "how much time it'll take to write my own simple VPN i

Anton Skorochod 489 Aug 2, 2022
Hummingbard is an experimental client for building decentralized communities on top of Matrix.

Hummingbard is an experimental client for building decentralized communities on top of Matrix.

null 80 Jun 21, 2022
Decentralized VPN

Decentralized VPN The RadVPN doesn't need any central point as it connects to other nodes directly (full mesh) it has built-in router that helps packe

Mehrdad Arshad Rad 1.1k Jul 31, 2022
A decentralized P2P networking stack written in Go.

noise noise is an opinionated, easy-to-use P2P network stack for decentralized applications, and cryptographic protocols written in Go. noise is made

Perlin Network 1.7k Jul 28, 2022
⛵ EdgeVPN: the immutable, decentralized, statically built VPN. NO central server!

⛵ EdgeVPN Fully Decentralized. Immutable. Portable. Easy to use Statically compiled VPN Usage Generate a config: ./edgevpn -g > config.yaml Run it on

Ettore Di Giacinto 131 Aug 5, 2022
Decentralized Chat ( 去中心化的聊天系统 )

dchat Introduce dchat (Decentralized Chat) 一款去中心化的聊天系统。 Features 轻量级 Unix指令交互 去中心化 断线重连 支持集群 分布式ID Start Install go get -u github.com/awesome-cmd/dcha

null 14 Jul 2, 2022