smartcontractkit / smartcontractkit/chainlink

[NODE] ethtx task fails to parse minConfirmations as uint and string from cborparse

Open
#6,680 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Attempting to set ethtx minConfirmations via cborparse output makes the jobrun error with:

  "__typename": "JobRun",
  "id": "110",
  "allErrors": [
    "minConfirmations: strconv.ParseUint: parsing "$(decode_cbor.minConfirmations)": invalid syntax: bad input for task"
  ],
  "createdAt": "2022-05-25T13:15:26.136101Z",
  "fatalErrors": [
    "minConfirmations: strconv.ParseUint: parsing "$(decode_cbor.minConfirmations)": invalid syntax: bad input for task"
  ],

No matter whether I send it as uint256 or string, the error is the same.

Strategy 1 - Passing minConfirmations as uint256:

_req.addUint("minConfirmations", uint256(spec.minConfirmations)); // NB: I do have a uint48

image

image

Strategy 2 - Passing minConfirmations as string:

_req.add("minConfirmations", Strings.toString(spec.minConfirmations)); // NB: I do use OZ Strings library

image

image

However, gasLimit can be passed as uint256 and set via cborparse output:

req.addUint("gasLimit", uint256(gasLimit));

Basic Information

Reproduced with Chainlink Node v1.2.0 and v1.4.1

Environment Variables

Not relevant

Steps to Reproduce

The hard way is implementing a consumer contract that sends minConfirmations. I haven't tried it using a webhook job though (I remember breaking an old node version attempting to make an ethtx via webhook job).

Thanks!

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

Reproduce an ethtx job using cborparse output for minConfirmations, comparing uint256 and string inputs with the working gasLimit case. Trace where these values are parsed and confirm completion when minConfirmations is accepted and the reported job run no longer contains the ParseUint error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, solidity
Domain
backend, blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.