smartcontractkit / chainlink

node of the decentralized oracle network, bridging on and off-chain computation
https://chain.link
Other
6.95k stars 1.69k forks source link

[NODE] Node jobs do not work following quickstart guide #6060

Closed dcamonster closed 2 years ago

dcamonster commented 2 years ago

Description I have followed the quickstart guide to try the Running a Chainlink Node + Fulfilling Requests. I have tried several options and have not been able to get the Chainlink node to execute any job.

Basic Information I'm running a Chainlink Node locally, I followed the quickstart guide and I deployed the contracts as discribed here to test the API request functionality. I have done it in rinkeby, with an external RPC provider (infura - websocket connection string) with LINK token obtained from the faucet. The node has ETH balance, displayed in the UI which confirms that the RPC provider is working. In no case have I managed to run the jobs, the chainlink node does not log any errors, only [DEBUG] logs that look normal (Received Head, Processed Head, ....).

In the contracts side everything seems right, after running que request with requestEthereumPrice from ATestnetConsumerthe oracle receives the request and LINK and logs the event OracleRequest (index_topic_1 bytes32 specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data) https://rinkeby.etherscan.io/address/0x55c2Db75484A4D6EfD366A2d9D70424f45b532b8#events

I have tried different docker images, tags: 1.1.1-nonroot and 1.1.0-nonroot

I have also tried:


Environment Variables

ROOT=.
LOG_LEVEL=debug
ETH_CHAIN_ID=4
CHAINLINK_TLS_PORT=0
SECURE_COOKIES=false
ALLOW_ORIGINS=*
ETH_URL=wss://rinkeby.infura.io/ws/v3/*********************************
DATABASE_URL=postgresql://postgres:mysecretpassword@172.17.0.2:5432/postgres?sslmode=disable

Steps to Reproduce running-a-chainlink-node fulfilling-requests

Additional information From the doc, this is the job code I'm using:

 type = "directrequest"
schemaVersion = 1
name = "Get > Uint256"
# Optional External Job ID: Automatically generated if unspecified
# externalJobID = "b1d42cd5-4a3a-4200-b1f7-25a68e48aad8"
contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS"
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="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"]

    decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx
"""
rgottleber commented 2 years ago

Hi,

I deployed a 1.1.1 node locally in docker and used the job code you supplied above.

Unfortunately, I'm not able to find any issue when I deploy the contracts myself.

To double-check a couple of things,

dcamonster commented 2 years ago

Hi,

Thanks for your answer @rgottleber

dcamonster commented 2 years ago

I found the problem:

image

The generated external job id has dash symbols cf90dcbd-91fe-48a6-8d10-1f53eaa9b635

If I remove them and run the requestEthereumPrice with _jobId = cf90dcbd91fe48a68d101f53eaa9b635 it works.

Chainlink Node 1.1.1 at commit 11788e23888b2d60554720faa237dabc62b1b8e7

rgottleber commented 2 years ago

Glad you found the issue, I was just going through this again and missed a - myself! They can be tricky for sure.

I'll close this issue, if you need anything else let us know.

dcamonster commented 2 years ago

Ok, thank you!

El mié, 23 feb 2022 a las 22:13, Richard Gottleber (< @.***>) escribió:

Glad you found the issue, I was just going through this again and missed a

  • myself! They can be tricky for sure.

I'll close this issue, if you need anything else let us know.

— Reply to this email directly, view it on GitHub https://github.com/smartcontractkit/chainlink/issues/6060#issuecomment-1049265589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW5AN6SF65RWQY5DJASAY5TU4VLZFANCNFSM5PA5KLBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

AtlasPilotPuppy commented 2 years ago

I just followed the Quickstart and was able to run it successfully. Can you ensure you do not have some sort of connectivity issues that could be cascading to this ?

rgottleber commented 2 years ago

Tracking in https://github.com/smartcontractkit/chainlink/issues/6094