0

I was running my v1jobs without any errors but then to support multiple servers for the same jobID, I had to shift to v2job specs and everything stopped working. Here is my V1Job spec.

{
  "initiators": [{"type": "runlog",
      "params": {"address": "0xf6bb26a724655553a5046b62d41e29bb29da1aee"}
      }],
  "tasks": [
    {"type": "twitter-username-verification"},
    {"type": "copy"},
    {"type": "jsonparse"},
    {"type": "resultcollect"},
    {"type": "ethtx",
      "params": {
        "abiEncoding": ["bytes32","bytes"]
      }
    }
  ]
}

Which was working fine, Here is my jobv2 specs for the same Job.

type                             = "directrequest"
schemaVersion          = 1
name                           = "ConversionToV2"
contractAddress        = "0xf6bB26A724655553A5046b62D41e29bB29DA1AeE"
externalJobID            = "855ad288-8a9d-4ab1-a575-dabd631bf084"
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)"]
           send_to_bridge [type="bridge" 
                    name="twitter-username-verification" 
                    requestData="{ \\"data\\": { \\"twitter_username\\": $(decode_cbor.twitter_username),  
                     \\"address_bytes\\":  $(decode_cbor.address_bytes)}}"]
          parse       [type="jsonparse" data="$(send_to_bridge)" path="result"]
          encode_data [type="ethabiencode"
                abi="fulfillBytes(bytes32 requestID, bytes data)",
                data="{\\"requestID\\": $(decode_log.requestId),  \\"bytesData\\": $(parse)}"
                ]
         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="0xf6bb26a724655553a5046b62d41e29bb29da1aee" data="$(encode_tx)"]
        decode_log -> decode_cbor -> send_to_bridge -> parse -> encode_data -> encode_tx -> submit_tx
"""

when i submit a job from smart contract to this new job. This is the error i am getting on my chainlink node.

{
  "outputs": [
    null
  ],
  "errors": [
    "task inputs: too many errors"
  ],
  "inputs": {
    "decode_cbor": {
    },
    "decode_log": {
    },
    "encode_data": {
    },
    "encode_tx": {
    },
    "jobRun": {
      "logAddress": "0xf6bb26a724655553a5046b62d41e29bb29da1aee",
      "logBlockHash": "0x3303e64d515aa986663f5120b1bc465d281a637c31d69d258770f7820e9a2c88",
      "logBlockNumber": 3101011,
      "logData": "AAAAAAAAAAAAAAAAw+zDL+ITBQojbowN4OonA+6pQooCQb1oqu2rqnzpn9aSIMyragy4DzH4PKbbJRlaxxEpuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjhvJvwQAAAAAAAAAAAAAAAAAAw+zDL+IjbowN4OonA+6pQorC+4UjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABhqpN3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQcHR3aXR0ZXJfdXNlcm5hbWVvYW1hZmFuc29mZmljaWFsbWFkZHJlc3NfYnl0ZXNUZ7eZQ8t0oLaN2Jw8nG5j5/kS6GxkcGF0aGZyZXN1bHQAAAAAAAAAAAAAAAAAAAAA",
      "logTopics": [
        "0xd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c65",
        "0x3835356164323838386139643461623161353735646162643633316266303834"
      ],
      "logTxHash": "0xa7672062ff796b0c1584317e0e6f34788251788cff67958fd88325c6e01c4b69",
      "meta": {
        "oracleRequest": {
          "callbackAddr": "0xc3EcC32FE213050a236e8C0De0EA2703eEA9428A",
          "callbackFunctionId": "0xc2fb8523",
          "cancelExpiration": "1638568823",
          "data": "0x70747769747465725f757365726e616d656f616d6166616e736f6666696369616c6d616464726573735f62797465735467b79943cb74a0b68dd89c3c9c6e63e7f912e86c647061746866726573756c74",
          "dataVersion": "1",
          "payment": "10000000000000000",
          "requestId": "0x0241bd68aaedabaa7ce99fd69220ccab6a0cb80f31f83ca6db25195ac71129b8",
          "requester": "0xc3EcC32FE213050a236e8C0De0EA2703eEA9428A",
          "specId": "0x3835356164323838386139643461623161353735646162643633316266303834"
        }
      }
    },
    "jobSpec": {
      "databaseID": 15,
      "externalJobID": "855ad288-8a9d-4ab1-a575-dabd631bf084",
      "name": "ConversionToV2.1"
    },
    "parse": {
    },
    "send_to_bridge": {
    },
    "submit_tx": {
    }
  },
  "taskRuns": [
    {
      "type": "ethabidecodelog",
      "createdAt": "2021-12-03T21:55:24.710386Z",
      "finishedAt": "2021-12-03T21:55:24.710809Z",
      "output": null,
      "error": "bad ABI specification: [34 79 114 97 99 108 101 82 101 113 117 101 115 116 40 97 100 100 114 101 115 115 32 99 97 108 108 98 97 99 107 65 100 100 114 44 32 98 121 116 101 115 52 32 99 97 108 108 98 97 99 107 70 117 110 99 116 105 111 110 73 100 44 32 32 117 105 110 116 50 53 54 32 99 97 110 99 101 108 69 120 112 105 114 97 116 105 111 110 44 32 32 98 121 116 101 115 32 100 97 116 97 44 10 32 32 32 32 32 32 32 32 117 105 110 116 50 53 54 32 100 97 116 97 86 101 114 115 105 111 110 44 32 117 105 110 116 50 53 54 32 112 97 121 109 101 110 116 44 32 98 121 116 101 115 51 50 32 114 101 113 117 101 115 116 73 100 44 32 97 100 100 114 101 115 115 32 114 101 113 117 101 115 116 101 114 44 32 117 105 110 116 50 53 54 32 115 112 101 99 73 100 41 34]: bad input for task",
      "dotId": "decode_log",
      "status": "errored"
    },
    {
      "type": "cborparse",
      "createdAt": "2021-12-03T21:55:24.710847Z",
      "finishedAt": "2021-12-03T21:55:24.711392Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "decode_cbor",
      "status": "errored"
    },
    {
      "type": "bridge",
      "createdAt": "2021-12-03T21:55:24.711439Z",
      "finishedAt": "2021-12-03T21:55:24.713997Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "send_to_bridge",
      "status": "not_run"
    },
    {
      "type": "jsonparse",
      "createdAt": "2021-12-03T21:55:24.714176Z",
      "finishedAt": "2021-12-03T21:55:24.715039Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "parse",
      "status": "not_run"
    },
    {
      "type": "ethabiencode",
      "createdAt": "2021-12-03T21:55:24.716688Z",
      "finishedAt": "2021-12-03T21:55:24.717419Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "encode_data",
      "status": "not_run"
    },
    {
      "type": "ethabiencode",
      "createdAt": "2021-12-03T21:55:24.717448Z",
      "finishedAt": "2021-12-03T21:55:24.718028Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "encode_tx",
      "status": "not_run"
    },
    {
      "type": "ethtx",
      "createdAt": "2021-12-03T21:55:24.718066Z",
      "finishedAt": "2021-12-03T21:55:24.718684Z",
      "output": null,
      "error": "task inputs: too many errors",
      "dotId": "submit_tx",
      "status": "not_run"
    }
  ],
  "createdAt": "2021-12-03T21:55:24.709383Z",
  "finishedAt": "2021-12-03T21:55:24.718719Z",
  "pipelineSpec": {
    "id": 15,
    "dotDagSource": " decode_log [type="ethabidecodelog" abi="OracleRequest(address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, bytes data, uint256 dataVersion, uint256 payment, bytes32 requestId, address requester, uint256 specId)" data="$(jobRun.logData)" topics="$(jobRun.logTopics)"] decode_cbor [type="cborparse" data="$(decode_log.data)"] send_to_bridge [type="bridge" name="twitter-username-verification" requestData="{ \"data\": { \"twitter_username\": $(decode_cbor.twitter_username), \"address_bytes\": $(decode_cbor.address_bytes)}}"] parse [type="jsonparse" data="$(send_to_bridge)" path="result"] encode_data [type="ethabiencode" abi="fulfillBytes(bytes32 requestID, bytes data)", data="{\"requestID\": $(decode_log.requestId), \"bytesData\": $(parse)}" ] 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="0xf6bb26a724655553a5046b62d41e29bb29da1aee" data="$(encode_tx)"] decode_log -> decode_cbor -> send_to_bridge -> parse -> encode_data -> encode_tx -> submit_tx "
  },
  "id": "11",
  "jobId": "15",
  "status": "errored",
  "type": "Pipeline job run"
}

which is really weird because the oracleRequest event emitted by operator.sol has exactly the same ABI as mentioned in the error logs. Please help, I have been trying to figure it out by myself for so long but still far away from any success whatsoever. Here is the snippet of the contract functions which are being used to publish the job.

Chainlink.Request memory req = buildChainlinkRequest(jobId, address(this), this.fulfillBytes.selector);
        req.add("twitter_username", _twitterUsername);
        req.addBytes("address_bytes", abi.encodePacked(msg.sender));
        req.add("path", "result");

        // req.add("copyPath", "RAW.ETH.USD.LASTMARKET");
        // bytes32  _reqID =  requestOracleData(req, fee);
        bytes32  _reqID =  sendChainlinkRequest(req, fee);

   ............... 
}

function fulfillBytes(bytes32 _requestId, 
                    bytes calldata bytesData) 
                    public 
                    recordChainlinkFulfillment(_requestId) {
   ...........
}
1
  • What version of the Chainlink node are you using? You should be able to see it in the keys tab of the UI of the node. Dec 6 '21 at 14:46
0

This is the working specification. There are three errors in the JobSpec posted above.

  1. All the tasks should be in one line and shouldnt be split into multiple lines.
  2. In encode data, it had requestID instead of requestId.
                abi="fulfillBytes(bytes32 requestID, bytes data)",
  1. Since it is going to be a multiword response returned from the adapter, The function that should be called by the node should have been fulfillOracleRequest2 rather than fulfillOracleRequest.
type = "directrequest"
schemaVersion = 1
name = "Version0.4"
contractAddress = "0x8aD2f78b9E05628C32096DB3575687A9Ee2FCF74"
externalJobID = "1b1fb378-03b3-482c-87d1-47f6f50a5706"
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)"] send_to_bridge [type="bridge"  name="twitter-username-verification" requestData="{ \\"data\\": {\\"twitter_username\\": $(decode_cbor.twitter_username), \\"address_bytes\\":  $(decode_cbor.address_bytes)}}"]
  parse       [type="jsonparse" data="$(send_to_bridge)" path="result"] 
  encode_data [type="ethabiencode" abi="(bytes32 requestId, bytes memory bytesData)", data="{\\"requestId\\": $(decode_log.requestId),  \\"bytesData\\": $(parse)}"]
  encode_tx   [type="ethabiencode" abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration,bytes 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="0x8aD2f78b9E05628C32096DB3575687A9Ee2FCF74" data="$(encode_tx)"]
  decode_log -> decode_cbor -> send_to_bridge -> parse -> encode_data -> encode_tx -> submit_tx
"""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.