smartcontractkit / smartcontractkit/chainlink

[FEAT] Importing Keys at startup time

Open
#9,295 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

`Description

  • Currently, in order to import eth/ocr/p2p keys, a node operator needs to import them after the node starts running. This also causes the issue of keys being automatically generated unnecessarily that then need to be deleted.
  • Another problem, is we can't set appropriate environment variables at the time of creation ( KEY_BUNDLE_ID, TRANSMITTER_ADDRESS, P2P_ID) because they won't be added to the database yet causing the node to crash.

Motivation
It's likely common for node operators to want to use separate keys from those generated, especially since autogenerated keys can be lost. Losing these keys can lead to loss of funds, as well as work for CLL to update aggs with newly generated keys.

Justification

  • Even without importing ones own keys, the flow for creating a new node requires some work arounds. For example you'll need to start your node, grab the generated values (transmitter addr, ocr key bundle id, p2p) and then restart your node with these as environment variables. If we can import these on start up, we wouldn't need this work around.
  • Having a simple initialization step to import keys could alleviate this, for example chainlink keys [eth|ocr|p2p] import ... , which currently doesn't work when the node isn't running.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing chainlink keys [eth|ocr|p2p] import ... command and the node startup initialization flow. Determine how ETH, OCR, and P2P keys can be imported before startup so the relevant environment values are available without unnecessary key generation; done means a newly created node starts successfully with imported keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.