|
|
(42 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| == Accessing Chianlink Node CLI ==
| |
| Many of the tasks on this page require you to have access to the Chianlink Node's CLI.
| |
|
| |
|
| To access the CLI, you must attach to your Chainlink container's bash tty session
| | == [[File:Index.png|left|frameless|30x30px]] '''Node Management Index''' == |
|
| |
|
| <code>docker exec -it $CONTAINER_NAME /bin/bash</code>
| | The purpose of this page is to provide an index of content made available to you on this wiki. |
|
| |
|
| | This content is either not indexed elsewhere, or does not exist outside of this wiki. |
|
| |
|
| Once connected, for the majority of the tasks you will want to accompish, you'll need to authenticate via your API credentials (the same credentials you use to access the web UI)
| |
|
| |
|
| <code>chainlink admin login</code>
| | ---- |
| | [[File:Pencil.png|left|frameless|30x30px]] |
| | === '''Environment Variable Details''' === |
|
| |
|
|
| |
|
| Now that you've authenticated with your API credentials, we can accomplish some more nuanced tasks that are not available via the web UI.
| | When you deploy a Chainlink Node, you need to create a .env file to include in your container's instantiation. |
|
| |
|
| | The purpose of this file is to override the default configuration your Chainlink node would set without it. |
|
| |
|
| == '''Chainlink Node Private Key Management''' ==
| |
|
| |
|
| ==== '''Where to Find Your Key(s)''' ====
| | ---- |
| * The command you want to run will vary based on the type of keys you're looking for | | === '''Miscellaneous Trouble Shooting''' === |
| ** CSA keys
| | * [https://wiki.dextrac.com/index.php/Node-stuck-on-nonce Node stuck on incorrect nonce] |
| *** <code>chainlink keys csa list</code>
| |
| ** Ethereum/EVM keys
| |
| *** <code>chainlink keys eth list</code>
| |
| ** OCR keys
| |
| *** <code>chainlink keys ocr list</code>
| |
| ** OCR 2 keys
| |
| *** <code>chainlink keys ocr2 list</code>
| |
| ** P2P keys
| |
| *** <code>chainlink keys p2p list</code>
| |
| ** Solana keys
| |
| *** <code>chainlink keys solana list</code>
| |
| ** Terra keys
| |
| *** <code>chainlink keys terra list</code>
| |
| ** VRK keys
| |
| *** <code>chainlink keys vrf list</code>
| |
|
| |
|
| ==== '''Generate New Key(s)''' ====
| |
| * This command will vary based on which key's you're creating
| |
| ** CSA keys
| |
| *** <code>chainlink keys csa create</code>
| |
| ** Ethereum/EVM keys
| |
| *** <code>chainlink keys eth create --evmChainID 1</code>
| |
| ** OCR keys
| |
| *** <code>chainlink keys ocr create</code>
| |
| ** OCR 2 keys
| |
| *** <code>chainlink keys ocr2 create</code>
| |
| ** P2P keys
| |
| *** <code>chainlink keys p2p create</code>
| |
| ** Solana keys
| |
| *** <code>chainlink keys solana create</code>
| |
| ** Terra keys
| |
| *** <code>chainlink keys terra create</code>
| |
| ** VRK keys
| |
| *** <code>chainlink keys vrf create</code>
| |
|
| |
|
| | ---- |
| | [[File:Pencil.png|left|frameless|30x30px]] |
| | === '''External Initiators''' === |
|
| |
|
| == '''Exporting Your Private Keys''' ==
| |
| If you'd like to export your private keys, the following steps will provide you with directions and examples
| |
|
| |
|
| While connected to, and authenticated with, the Chainlink CLI, we will want to:
| |
|
| |
|
| # List our keys to identify which one(s) we wish to export.
| | ---- |
| # Create a file containing our password used to encrypt the exported password.
| | [[File:Construction.png|left|frameless|30x30px]] |
| # Export our password.
| | === '''Job Management''' === |
| # Copy the private key file to our host.
| | Chainlink Nodes require jobs in order for them to know what is expected of them. |
|
| |
|
| In the below example, we will be exporting an Ethereum mainnet private key.
| | ==== '''Example JobSpecs''' ==== |
| | Below you will find example jobspecs for each job type that the Chainlink Node Supports |
|
| |
|
| ==== '''List our keys to identify which one(s) we wish to export.''' ==== | | ===== '''Direct Request Example''' ===== |
| <code>chainlink keys eth list</code>
| | Please click above to navigate to Direct Request (DR) / RunLog (RL) example spec |
|
| |
|
| ==== '''Create a file containing our password used to encrypt the exported password.''' ==== | | ===== '''FluxMonitor Example''' ===== |
| <code>echo "$YOURPASSWORD" > passwordFile</code>
| | Please click above to navigate to FluxMonitor (FM) example spec |
|
| |
|
| ==== '''Export our password.''' ==== | | ===== '''Off Chain Reporting Example''' ===== |
| <code>chainlink keys eth export $0xKEY_ADDRESS --newpassword passwordFile --output $NAME_FOR_PRIAVTEKEY_FILE</code>
| | Please click above to navigate to Off Chain Reporting (OCR) example spec |
|
| |
|
| ==== '''Copy the private key file to our host.''' ====
| |
| <code>docker cp $CONTAINER_NAME:/$NAME_FOR_PRIVATEKEY_FILE /host/path/$NAME_FOR_PRIVATEKEY_FILE</code>
| |
|
| |
|
| Now that the file is on your Docker host, you can scp it somewhere else, or whatever you'd like to do with it.
| |
|
| |
|
| | ---- |
| | [[File:Bridge.png|left|frameless|30x30px]] |
| | === '''Bridge Management''' === |
| | Chainlink Nodes use bridges to enable a key:value association local to the Chainlink Node. |
|
| |
|
| == '''Importing/Replacing Your Private Keys''' ==
| | This enables the node operator to modify where a bridge points to without having to redeploy every job that references that data source |
| In some situations, you may find yourself in need of importing your own keys, or perhaps you've gotten a borked node and want to export your old keys and import them into a newly built Chainlink node.
| |
|
| |
|
| Whatever your situation, the steps below will assist
| | ==== '''Adding / Replacing / Removing Bridges''' ==== |
| | This page will provide directions on managing your bridges and all potential "gotchas" that you may run into |
|
| |
|
| ==== '''Key Format''' ====
| |
| In order for your keys to be accepted for use in the Chainlink node, they must be in the proper, single line, json format.
| |
|
| |
|
| An example is shown below:
| |
|
| |
|
| <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">{"address":"bdcfbbd9da176e233d5a8d9a77905c2853bf10a9","crypto":{"cipher":"aes-128-ctr","ciphertext":"69ecad9449d479b7c2dc7eac19131da1af9bb64347d33e5b3bff314c7a3710f9","cipherparams":{"iv":"dd4535b11fa85e25fe0b9d4f2889aa66"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"4be7fad8f62c395bbb7457e1e398f37a346f36df6673c377dd91d0efe201821f"},"mac":"9a7c8461b60b98d16376e665b290aecf75620d8276799fbe75045dbbf2b3bdd8"},"id":"bdcfbbd9-da17-6e23-3d5a-8d9a77905c28","version":3}</pre>
| | ---- |
| | [[File:Key.png|left|frameless|30x30px]] |
| | === '''Key Managmeent''' === |
|
| |
|
| ==== '''Key Password''' ==== | | ==== [[Node Key Management|'''Chainlink Node Account Private Keys''']] ==== |
| Each private key must be encrypted, and to accompish this, the Chainlink Node will require a local file (within the container) to decrypt the key.
| | The Chainlink Node manages its own wallet's private keys keys for each network type it supports. At the time of this writing, that includes Layer One and Layer Two EVM chains, Solana, and Terra. |
|
| |
|
| <code>echo "$YOURPASSWORD" > passwordFile</code>
| | These wallets are responsible for paying the transaction fees associated with writing data on-chain for each network. |
|
| |
|
| We'll need to copy both the private key file and the password file into the Chianlink Node's container.
| | ==== '''CSA Keys''' ==== |
| | The purpose of the CSA keys is for an unreleased feature. No more details can be provided at this time. |
|
| |
|
| ==== '''With the key in the correct format, we will need to copy both the key and the password file into the Chainlink Node''' ==== | | ==== '''OCR Keys''' ==== |
| <code>docker cp /host/path/$NAME_FOR_PRIVATEKEY_FILE $CONTAINER_NAME:/$NAME_FOR_PRIVATEKEY_FILE</code>
| | The purpose of your OCR keys is to enable OCR communication between the nodes. |
|
| |
|
| <code>docker cp /host/path/$PASSWORD_FILE $CONTAINER_NAME:/$PASSWORD_FILE</code>
| | Each Chainlink node has their own OCR keys. Modifying these keys in any manner is not suggested. |
|
| |
|
| | ==== '''P2P Keys''' ==== |
| | Similar to the OCR keys, the P2P keys enable peer to peer communication among the Chainlink Nodes |
|
| |
|
| Once the file is copied into the Chainlink Node's container, we will want to enter the container's bash session and authenticate with our API credentials.
| | ==== '''VRF Keys''' ==== |
| | | The VRF Keys are specifically for the VRF functionality. No more details are available at this time. |
| Once done, we will want to
| |
| | |
| # List the contents of our working directory to make sure our private key and password files are present.
| |
| # List our keys to identify which one(s) we wish to replace.
| |
| # Delete the unwanted/unused key.
| |
| # Import the desired key.
| |
| | |
| | |
| ==== '''List the contents of our working directory to make sure our private key and password files are present.''' ==== | |
| <code>ls -l</code>
| |
| | |
| <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">-rw------- 1 root root 491 May 20 16:24 0xDBD580eE789fF9539d6fd416d0A059C0D1cC1dbF-pkey.json
| |
| | |
| -rw-r--r-- 1 root root 16 May 20 16:24 passwordFile</pre>
| |
| | |
| | |
| | |
| | |
| ==== '''List our keys to identify which one(s) we wish to export.''' ====
| |
| <code>chainlink keys eth list</code>
| |
| | |
| <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">🔑 ETH keys
| |
| | |
| <nowiki>-------------------------------------------------------------</nowiki>
| |
| | |
| Address: 0xbdCfbBD9DA176E233d5A8d9a77905c2853bF10A9
| |
| | |
| EVM Chain ID: 4
| |
| | |
| ETH: 0.000000000000000000
| |
| | |
| LINK: 0
| |
| | |
| Is funding: false
| |
| | |
| Created: 2022-05-20 15:52:04.770036 +0000 UTC
| |
| | |
| Updated: 2022-05-20 15:52:04.770036 +0000 UTC
| |
| | |
| Max Gas Price Wei: 5000000000000</pre>
| |
| | |
| Assuming we want to delete the above key and replace it with a new one with the address of <code>0xDBD580eE789fF9539d6fd416d0A059C0D1cC1dbF</code>, we will need to:
| |
| | |
| | |
| ==== '''Delete the unwanted/unused key.''' ====
| |
| <code>chainlink keys eth delete --hard --yes 0xbdCfbBD9DA176E233d5A8d9a77905c2853bF10A9</code>
| |
| | |
| '''Note:''' The <code>--hard</code> and <code>--yes</code> flags will delete without archiving (no restoration options), and skip the confirmation prompt respectively.
| |
| | |
| '''Note:''' If you delete any key without exporting it, it is gone ''forever''. When in doubt, '''always export your key before deleting it.'''
| |
| | |
| <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">🔑 Deleted ETH key
| |
| | |
| <nowiki>-------------------------------------------------------------</nowiki>
| |
| | |
| Address: 0xbdCfbBD9DA176E233d5A8d9a77905c2853bF10A9
| |
| | |
| EVM Chain ID: 4
| |
| | |
| ETH: 0.000000000000000000
| |
| | |
| LINK: 0
| |
| | |
| Is funding: false
| |
| | |
| Created: 2022-05-20 15:52:04.770036 +0000 UTC
| |
| | |
| Updated: 2022-05-20 15:52:04.770036 +0000 UTC
| |
| | |
| Max Gas Price Wei: 0</pre>
| |
| | |
| | |
| With the old key deleted, we will want to now import the desired key.
| |
| | |
| | |
| ==== '''Import new private key''' ====
| |
| <code>chainlink keys eth import --oldpassword passwordFile --evmChainID 4 0xDBD580eE789fF9539d6fd416d0A059C0D1cC1dbF-pkey.json</code>
| |
| | |
| | |
| <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">🔑 Imported ETH key
| |
| | |
| <nowiki>-------------------------------------------------------------</nowiki>
| |
| | |
| Address: 0xDBD580eE789fF9539d6fd416d0A059C0D1cC1dbF
| |
| | |
| EVM Chain ID: 4
| |
| | |
| ETH: 0.000000000000000000
| |
| | |
| LINK: 0
| |
| | |
| Is funding: false
| |
| | |
| Created: 2022-05-20 16:33:17.630505 +0000 UTC
| |
| | |
| Updated: 2022-05-20 16:33:17.630505 +0000 UTC
| |
| | |
| Max Gas Price Wei: 0</pre>
| |
Node Management Index
The purpose of this page is to provide an index of content made available to you on this wiki.
This content is either not indexed elsewhere, or does not exist outside of this wiki.
Environment Variable Details
When you deploy a Chainlink Node, you need to create a .env file to include in your container's instantiation.
The purpose of this file is to override the default configuration your Chainlink node would set without it.
Miscellaneous Trouble Shooting
External Initiators
Job Management
Chainlink Nodes require jobs in order for them to know what is expected of them.
Example JobSpecs
Below you will find example jobspecs for each job type that the Chainlink Node Supports
Direct Request Example
Please click above to navigate to Direct Request (DR) / RunLog (RL) example spec
FluxMonitor Example
Please click above to navigate to FluxMonitor (FM) example spec
Off Chain Reporting Example
Please click above to navigate to Off Chain Reporting (OCR) example spec
Bridge Management
Chainlink Nodes use bridges to enable a key:value association local to the Chainlink Node.
This enables the node operator to modify where a bridge points to without having to redeploy every job that references that data source
Adding / Replacing / Removing Bridges
This page will provide directions on managing your bridges and all potential "gotchas" that you may run into
Key Managmeent
The Chainlink Node manages its own wallet's private keys keys for each network type it supports. At the time of this writing, that includes Layer One and Layer Two EVM chains, Solana, and Terra.
These wallets are responsible for paying the transaction fees associated with writing data on-chain for each network.
CSA Keys
The purpose of the CSA keys is for an unreleased feature. No more details can be provided at this time.
OCR Keys
The purpose of your OCR keys is to enable OCR communication between the nodes.
Each Chainlink node has their own OCR keys. Modifying these keys in any manner is not suggested.
P2P Keys
Similar to the OCR keys, the P2P keys enable peer to peer communication among the Chainlink Nodes
VRF Keys
The VRF Keys are specifically for the VRF functionality. No more details are available at this time.