Skip to content

[PRODCRE-1746] Use moved bigInt from chainlink-common#21192

Merged
pavel-raykov merged 12 commits intodevelopfrom
move-big
Feb 17, 2026
Merged

[PRODCRE-1746] Use moved bigInt from chainlink-common#21192
pavel-raykov merged 12 commits intodevelopfrom
move-big

Conversation

@pavel-raykov
Copy link
Collaborator

@pavel-raykov pavel-raykov commented Feb 16, 2026

We use moved bigInt from sqlutil package everywhere with the following caveats:

  • Inlined hexutil.EncodeBig(b.ToInt()) to produce hex output
  • Inlined most arithmetic operations with ToInt() conversion. (Only in core/services/s4/address_range.go added sub and add to simplify the transition)
  • Ignored existing lint issues related to unchecked uint64->int64 conversion and var naming (to keep this PR focused on bigInt only)

Requires
smartcontractkit/chainlink-common#1841
smartcontractkit/chainlink-evm#359

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

CORA - Pending Reviewers

All codeowners have approved! ✅

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@trunk-io
Copy link

trunk-io bot commented Feb 16, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@pavel-raykov pavel-raykov added the allow-lint-issues Allow merging despite linter issues. Do not abuse. label Feb 17, 2026
@pavel-raykov pavel-raykov marked this pull request as ready for review February 17, 2026 10:10
Copilot AI review requested due to automatic review settings February 17, 2026 10:10
@pavel-raykov pavel-raykov requested review from a team as code owners February 17, 2026 10:10
@pavel-raykov pavel-raykov requested a review from winder February 17, 2026 10:10
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)
11 New Major Issues (required ≤ 5)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates test, deployment, and core code away from chainlink-evm/pkg/utils/big to the moved sqlutil.Big type from chainlink-common, aligning the codebase with upstream package moves required by the linked dependency PRs.

Changes:

  • Bump chainlink-common and chainlink-evm module versions across root + submodules to versions containing the moved big-int type.
  • Replace usages of chainlink-evm/pkg/utils/big with chainlink-common/pkg/sqlutil (sqlutil.Big, sqlutil.New, sqlutil.NewI) and inline conversions/comparisons via ToInt() where needed.
  • Update S4/keeper/ocr/job/web layers and related tests to the new big-int type (including address-range arithmetic and hex rendering adjustments).

Reviewed changes

Copilot reviewed 125 out of 132 changed files in this pull request and generated no comments.

Show a summary per file
File Description
system-tests/tests/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
system-tests/tests/go.mod Bump chainlink-common and indirect chainlink-evm versions
system-tests/lib/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
system-tests/lib/go.mod Bump chainlink-common and chainlink-evm versions
system-tests/lib/cre/features/evm/v1/evm.go Switch EVM chain ID comparisons to sqlutil.Big (ToInt()-based compare)
system-tests/lib/cre/don/config/config.go Build EVM configs with sqlutil.New(...) chain IDs and update equality checks
integration-tests/types/config/node/core.go Use sqlutil.New(...) for EVM chain IDs in config generation
integration-tests/smoke/ccip/ccip_reader_bench_test.go Use sqlutil.New(...) for logpoller.Log EVMChainID fields
integration-tests/load/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
integration-tests/load/go.mod Bump chainlink-common and chainlink-evm versions
integration-tests/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
integration-tests/go.mod Bump chainlink-common and chainlink-evm versions
integration-tests/ccip-tests/types/config/node/core.go Use sqlutil.New(...) for EVM chain IDs in config generation
go.sum Root dependency checksum updates for chainlink-common/chainlink-evm bumps
go.mod Root dependency bumps to chainlink-common and chainlink-evm versions containing moved big-int
deployment/utils/nodetestutils/node.go Replace EVM chain ID big-int helpers with sqlutil equivalents and ToInt() compares
deployment/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
deployment/go.mod Bump chainlink-common and chainlink-evm versions
deployment/environment/nodeclient/chainlink_models.go Update JSON model EVMChainID type to *sqlutil.Big
core/web/resolver/spec_test.go Update resolver spec tests to build job specs with sqlutil.NewI(...)
core/web/resolver/eth_transaction_test.go Update chain ID test data to sqlutil.NewI(...)
core/web/resolver/eth_key_test.go Update ETH key resolver tests to sqlutil.NewI(...) chain IDs
core/web/resolver/chain_test.go Update chain resolver tests to sqlutil.NewI(...)
core/web/presenters/job_test.go Update presenter tests to use sqlutil.NewI(...)
core/web/presenters/job.go Presenter structs now expose *sqlutil.Big EVMChainID fields
core/web/presenters/evm_forwarder_test.go Update forwarder presenter tests to sqlutil.NewI(...)
core/web/presenters/evm_forwarder.go Forwarder presenter EVMChainID now sqlutil.Big
core/web/presenters/eth_tx.go EthTx presenter now uses sqlutil.Big and sqlutil.New(...)
core/web/presenters/eth_key_test.go Update ETH key presenter tests to sqlutil.NewI(...)
core/web/presenters/eth_key.go ETH key presenter now uses sqlutil.Big for chain ID and gas price
core/web/loader/loader_test.go Loader tests now build EVM configs with sqlutil.NewI(...)
core/web/lca_controller.go LCA response model now uses *sqlutil.Big EVMChainID
core/web/jobs_controller_test.go Job controller tests now assert sqlutil.NewI(...) chain IDs
core/web/evm_transfer_controller_test.go Transfer controller tests now use sqlutil.New(...) for request chain IDs
core/web/evm_forwarders_controller_test.go Forwarders controller tests now use sqlutil.New(...) chain IDs
core/web/evm_forwarders_controller.go Track request EVMChainID type now *sqlutil.Big
core/web/eth_keys_controller.go Convert max gas price option to *sqlutil.Big via sqlutil.New(...)
core/web/chains_controller_test.go Chains controller tests now use sqlutil.New(...)
core/store/store.go Replace big-int helper usage in crypto rand upper-bound creation with sqlutil.NewI(...).ToInt()
core/store/models/common.go SendEtherRequest EVMChainID type now *sqlutil.Big
core/store/migrate/migrate_test.go Migration tests now use sqlutil.New(...) and sqlutil.NewI(...) for chain IDs
core/services/vrf/v2/listener_v2_log_listener_test.go Update helper return type to *sqlutil.Big and chain ID construction
core/services/vrf/v2/integration_v2_test.go Update simulated chain ID usage to sqlutil.New(...)
core/services/vrf/v2/integration_helpers_test.go Replace config chain ID pointer casts with *sqlutil.Big
core/services/vrf/v1/integration_test.go Replace config chain ID pointer casts with *sqlutil.Big
core/services/s4/storage_test.go Update S4 storage tests to use sqlutil.New(...) addresses
core/services/s4/storage.go Replace address big-int wrapper with sqlutil.New(...)
core/services/s4/postgres_orm_test.go Update postgres ORM tests to use sqlutil.New(...) addresses
core/services/s4/postgres_orm.go ORM Get signature now accepts *sqlutil.Big
core/services/s4/orm.go Row/SnapshotRow/ORM interfaces updated to *sqlutil.Big; Clone uses sqlutil.New(...)
core/services/s4/mocks/orm.go Regenerate/update mock signatures to *sqlutil.Big
core/services/s4/in_memory_orm_test.go Update in-memory ORM tests to sqlutil.New(...) addresses
core/services/s4/in_memory_orm.go In-memory ORM now keys addresses via hexutil.EncodeBig(address.ToInt()) and uses *sqlutil.Big
core/services/s4/cached_orm_wrapper_test.go Update cached wrapper tests to sqlutil.New(...) addresses
core/services/s4/cached_orm_wrapper.go Cached wrapper Get signature now accepts *sqlutil.Big
core/services/s4/address_range_test.go Update address-range tests to sqlutil.Big plus big_math helpers and hex encoding
core/services/s4/address_range.go AddressRange now uses *sqlutil.Big; arithmetic implemented via big_math helpers
core/services/relay/evm/median_test.go Relay config test now uses sqlutil.New(...) chain ID
core/services/pipeline/orm_test.go Job specs in pipeline ORM tests now use *sqlutil.Big chain IDs
core/services/ocrcommon/telemetry_test.go OCR telemetry tests now use *sqlutil.Big chain IDs
core/services/ocrcommon/data_source_test.go Persisted cache value now uses sqlutil.NewI(...)
core/services/ocrcommon/data_source.go Persisted ResultTimePair.Result now uses sqlutil.Big and sqlutil.New(...)
core/services/ocr2/plugins/s4/plugin_test.go S4 plugin tests convert address via ToInt().Bytes() and use sqlutil.New(...)
core/services/ocr2/plugins/s4/plugin.go S4 plugin converts ORM address via ToInt().Bytes() and uses *sqlutil.Big in local keying
core/services/ocr2/plugins/s4/messages_test.go Update query row address bytes extraction via ToInt().Bytes()
core/services/ocr2/plugins/s4/messages.go Marshal/Unmarshal address-range and addresses using sqlutil.Big
core/services/ocr2/plugins/s4/integration_test.go Update address comparisons and conversions using sqlutil.Big and ToInt()
core/services/ocr2/plugins/ocr2keeper/integration_test.go Forwarder ORM calls updated to sqlutil.Big chain ID value
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store.go Persisted UpkeepID now stored as *sqlutil.Big
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm_test.go Tests now use sqlutil.New(...) for UpkeepID
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm.go ORM now stores chainID/UpkeepID using sqlutil.Big
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go Logpoller.Log test data now uses sqlutil.New(...) chain IDs
core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go Recoverer tests now use sqlutil.New(...) chain IDs
core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go Logpoller.Log test data now uses sqlutil.New(...) chain IDs
core/services/ocr2/plugins/llo/integration_test.go Replace multiplier big-int helpers with sqlutil.NewI(...) and update ABI encoder helper signature
core/services/ocr2/plugins/ccip/testhelpers/testhelpers_1_4_0/chainlink.go Config helpers now cast chain IDs to *sqlutil.Big
core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go Config helpers now cast chain IDs to *sqlutil.Big
core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go Log test helper now sets EVMChainID via sqlutil.New(...)
core/services/ocr2/delegate_test.go Delegate tests now build chain IDs via sqlutil.New(...)
core/services/ocr/database.go OCR pending transmission median now stored using sqlutil.Big
core/services/keystore/keys/ethkey/models.go ETH key state now stores EVMChainID as sqlutil.Big
core/services/keystore/eth_test.go Keystore tests now insert keys using sqlutil.New(...) chain IDs
core/services/keeper/upkeep_executer_unit_test.go Upkeep ID test data now uses sqlutil.NewI(...)
core/services/keeper/upkeep_executer_test.go Keeper tests now cast config chain IDs to *sqlutil.Big and head chain IDs to sqlutil.NewI(...)
core/services/keeper/registry_synchronizer_sync_test.go Sync tests now use sqlutil.New(...) upkeep ID
core/services/keeper/registry_synchronizer_sync.go Registry sync now uses sqlutil.Big for upkeep IDs; positioning constant uses big_math
core/services/keeper/registry_synchronizer_process_logs.go Log handlers now wrap upkeep IDs using sqlutil.New(...) and use []sqlutil.Big batches
core/services/keeper/registry1_3_synchronizer_test.go DB queries now use sqlutil.New(...) upkeep ID
core/services/keeper/registry1_1_synchronizer_test.go Positioning constant test now uses sqlutil.NewI(...)
core/services/keeper/orm_test.go Keeper ORM tests now use sqlutil upkeep IDs and ToInt().Cmp(...) ordering
core/services/keeper/orm.go Keeper ORM API now accepts/returns sqlutil.Big upkeep IDs
core/services/keeper/models_test.go Upkeep identifier tests now use sqlutil.New(...)
core/services/keeper/models.go UpkeepRegistration.UpkeepID now *sqlutil.Big; UpkeepIdentifier now aliases sqlutil.Big
core/services/keeper/integration_test.go Integration tests now cast chain IDs to *sqlutil.Big and forwarder chain ID to sqlutil.Big
core/services/job/orm.go Job ORM FindJobIDByAddress now accepts *sqlutil.Big chain ID
core/services/job/models.go Job spec models now use *sqlutil.Big for EVMChainID/CCIPChainSelector fields
core/services/job/mocks/orm.go Update job ORM mocks to use *sqlutil.Big in signatures
core/services/job/job_orm_test.go Job ORM tests now use sqlutil.New(...) and ToInt() conversions where needed
core/services/job/helpers_test.go OCR spec helpers now set chain ID with sqlutil.New(...)
core/services/headreporter/telemetry_reporter_test.go Head telemetry tests now set EVMChainID with sqlutil.NewI(...)
core/services/headreporter/telemetry_reporter.go Logging now converts chain ID via ToInt().Int64()
core/services/headreporter/head_reporter_test.go Head reporter tests now use sqlutil.New(...) chain IDs
core/services/fluxmonitorv2/orm_test.go FluxMonitor job fixtures now use *sqlutil.Big chain ID
core/services/feeds/service_test.go Feeds service tests now use *sqlutil.Big chain ID variable
core/services/feeds/service.go Internal job lookup now uses *sqlutil.Big chain ID variable
core/services/directrequest/validate.go DirectRequest TOML now uses *sqlutil.Big for EVMChainID
core/services/directrequest/delegate_test.go Delegate test job specs now cast to *sqlutil.Big
core/services/chainlink/relayer_chain_interoperators_test.go Test configs now create chain IDs via sqlutil.New(...)
core/services/chainlink/config_test.go Config fixtures now use sqlutil.NewI(...) chain IDs
core/services/blockheaderfeeder/validate_test.go Validation test now expects sqlutil.NewI(...) chain ID
core/services/blockheaderfeeder/validate.go Validation now checks chain ID using ToInt().Int64()
core/services/blockhashstore/validate_test.go Validation test now expects sqlutil.NewI(...) chain ID
core/services/blockhashstore/delegate_test.go Delegate tests now use *sqlutil.Big chain IDs (casts/new values)
core/scripts/keystone/src/99_fetch_keys.go Script now compares chain IDs via ToInt().Cmp(big.NewInt(...))
core/scripts/keystone/src/02_provision_crib.go Script now sets ChainID using sqlutil.NewI(...)
core/scripts/go.sum Dependency checksum updates for chainlink-common/chainlink-evm bumps
core/scripts/go.mod Script module dependency bumps to updated chainlink-common/chainlink-evm
core/scripts/functions/src/fetching.go Script now compares chain IDs via ToInt().Cmp(big.NewInt(...))
core/internal/testutils/evmtest/evmtest.go Test helpers now use *sqlutil.Big chain IDs and ToInt() access
core/internal/testutils/configtest/general_config.go Test config defaults now use sqlutil.NewI(...) and ToInt().Cmp(...)
core/internal/features/ocr2/features_ocr2_helper.go Forwarder ORM setup now uses sqlutil.Big chain ID value
core/internal/features/features_test.go Forwarder ORM setup and test head chain IDs now use sqlutil
core/internal/cltest/simulated_backend.go Simulated backend helpers now create chain ID via sqlutil.New(...)
core/internal/cltest/factories.go Key/head/job factories now accept/use sqlutil.Big chain IDs and sqlutil.New(...)
core/internal/cltest/cltest.go App helpers now use *sqlutil.Big for chain ID dep injection and head creation
core/cmd/forwarders_commands_test.go CLI presenter test now uses sqlutil.NewI(...) chain ID
core/cmd/forwarders_commands.go CLI request now uses (*sqlutil.Big)(chainID) cast
core/cmd/evm_transaction_commands.go CLI SendEther request now uses (*sqlutil.Big)(evmChainID) cast
core/cmd/eth_keys_commands_test.go CLI ETH keys presenter test now uses sqlutil.NewI(...) gas price
core/cmd/chains_commands_test.go CLI chain test helper now returns *sqlutil.Big
core/cmd/blocks_commands_test.go CLI blocks tests now cast chain IDs to *sqlutil.Big
core/capabilities/ccip/ccip_integration_tests/usdcreader/usdcreader_test.go CCIP DB population test now uses sqlutil.New(...) for log EVMChainID

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pavel-raykov pavel-raykov requested a review from dimriou February 17, 2026 10:17
Copy link
Collaborator

@dimriou dimriou left a comment

Choose a reason for hiding this comment

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

Approved, although the linter is complaining. Not sure if it's related to the old code.

@pavel-raykov pavel-raykov added this pull request to the merge queue Feb 17, 2026
Merged via the queue into develop with commit 00ba054 Feb 17, 2026
234 of 238 checks passed
@pavel-raykov pavel-raykov deleted the move-big branch February 17, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-lint-issues Allow merging despite linter issues. Do not abuse.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants