Skip to content

Conversation

@vreff
Copy link
Contributor

@vreff vreff commented Sep 2, 2025

Related: smartcontractkit/chainlink-evm#214

This PR removes the use of chain ID: 0. Instead, it uses the FixtureChainID & NullClientChainID from chainlink-evm, which uses a value that is unlikely to be used by a production chain.

This change is necessary due to a breaking change in go-ethereum that disallows using 0 as the chain ID: https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction_signing.go#L193. In order to bump go-ethereum, this change needs to be applied.

@vreff vreff changed the title override invalid chain ID Remove use of zero chain ID. Sep 3, 2025
@vreff vreff marked this pull request as ready for review September 3, 2025 13:04
@vreff vreff requested review from a team as code owners September 3, 2025 13:04
ibrajer
ibrajer previously approved these changes Sep 3, 2025
dhaidashenko
dhaidashenko previously approved these changes Sep 3, 2025
Copy link
Collaborator

@dhaidashenko dhaidashenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a friendly reminder to update refenrece to chainlink-evm once it's merged

@vreff vreff requested a review from jmank88 September 3, 2025 13:14
@cl-sonarqube-production
Copy link

peerID := cltest.DefaultP2PPeerID
ocrKeyID := cltest.DefaultOCRKeyBundleID
jobSpecText := fmt.Sprintf(ocrJobSpecText, testutils.NewAddress().Hex(), peerID, ocrKeyID, transmitterAddress.Hex(), b1, b2)
jobSpecText := fmt.Sprintf(ocrJobSpecText, testutils.NewAddress().Hex(), testutils.FixtureChainID.String(), peerID, ocrKeyID, transmitterAddress.Hex(), b1, b2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit/ You don't have to call String() with %s:

Suggested change
jobSpecText := fmt.Sprintf(ocrJobSpecText, testutils.NewAddress().Hex(), testutils.FixtureChainID.String(), peerID, ocrKeyID, transmitterAddress.Hex(), b1, b2)
jobSpecText := fmt.Sprintf(ocrJobSpecText, testutils.NewAddress().Hex(), testutils.FixtureChainID, peerID, ocrKeyID, transmitterAddress.Hex(), b1, b2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants