Skip to content

Conversation

@dimkouv
Copy link
Contributor

@dimkouv dimkouv commented Apr 9, 2025

About

⚠️⚠️⚠️ The PipelinePriceGetter is a component that was deprecated around one year ago.
There was a migration process to move all the JobSpecs to the dynamic price getter.
Recently we introduced some changes to fix an issue with token addresses collision: #17133 this changes required interfaces to be updated. The pipeline price getter was not migrated to the new interface after getting a confirmation that it's not in use. That did not seem to be the case though, the token prices pipeline is still in use, even on mainnet. ⚠️⚠️⚠️

Changes

This PR adds support for token pricing pipeline. How it works:

0. Lot's of plumbing changes to provide chain selectors and the source native address to the priceGetter initializer.

1. GetJobSpecTokenPricesUSD(ctx context.Context) (map[ccipcommon.TokenID]*big.Int, error)

Keeps the existing functionality to get the prices.
- If the token address is equal to source native then the chain selector is of source chain
- Else it is the dest chain selector

The price service (caller of price getter) is responsible for finding the missing dest native token and reporting that price.
 
2. GetTokenPricesUSD(ctx context.Context, tokens []ccipcommon.TokenID) (map[ccipcommon.TokenID]*big.Int, error)

Flattens all the provided TokenIDs into a slice of addresses.
Fetches prices for this addresses using existing functionality.
And then similar to 1. maps chain selectors to generate TokenIDs

@dimkouv dimkouv requested review from a team as code owners April 9, 2025 12:32
@dimkouv dimkouv requested a review from Atrax1 April 9, 2025 12:32
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

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.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

@cl-sonarqube-production
Copy link

@dimkouv dimkouv added this pull request to the merge queue Apr 9, 2025
Merged via the queue into develop with commit d70df8a Apr 9, 2025
191 of 192 checks passed
@dimkouv dimkouv deleted the dk/token-price-pipeline branch April 9, 2025 13:39
mateusz-sekara pushed a commit that referenced this pull request Apr 9, 2025
)

* token pricing pipeline

* remove deprecated tags since linter doesn't like it
mateusz-sekara added a commit that referenced this pull request Apr 9, 2025
CCIP - Implement token pricing interface for PipelinePriceGetter (#17202)
github-merge-queue bot pushed a commit that referenced this pull request May 7, 2025
* Bump version and update CHANGELOG for core v2.23.0

* CCIP - Implement token pricing interface for PipelinePriceGetter (#17202)

* token pricing pipeline

* remove deprecated tags since linter doesn't like it

* Fixing telemetry bug (#17208)

* core/capabilities/ccip: correct telem type in monitor endpoint (#17219)

* core/capabilities/ccip: correct telem type in monitor endpoint

* don't panic

* switch to require

* Update solana ref to pull in 3 changes needed for 2.23 (#17237)

* Update solana ref to pull in CR race fix & lookback feature

* Update docs for Solana config

* Update tests

* pnpm changeset

* make config-docs

* Update solana ref

* Added new config for Solana block history estimator

* Updated chainlink-solana commit

* Upgraded chainlink-solana dependency

---------

Co-authored-by: amit-momin <amit.momin@smartcontract.com>

* Revert "Updated EVM Write target to use Generalized WT framework (#17118)"

This reverts commit 654c21e.

* newline

* fixed lint issues

* Backport: bump chainlink-solana to fix nested CPI event parsing issue (#17273)

* Bump chainlink-solana to fix CR namespace issue

* make modgraph

* patch

* chore: replace prom/common with v0.62.0

* fix: bump chain selectors to v1.0.52

* chore: add changeset

* chore: capitalize

* chore: add tag to changeset

* Finalize date on changelog for 2.23.0

* Update go.mod, bump chain-selectors

* make tidy and make modgraph

Signed-off-by: bwest981 <3317895+Bwest981@users.noreply.github.com>

* Accept develop package.json to resolve conflict

---------

Signed-off-by: bwest981 <3317895+Bwest981@users.noreply.github.com>
Co-authored-by: gheorghestrimtu <studentcuza@gmail.com>
Co-authored-by: dimitris <dimitrios.kouveris@smartcontract.com>
Co-authored-by: Mateusz Sekara <mateusz.sekara@gmail.com>
Co-authored-by: Andrés Juliá <43075089+AndresJulia@users.noreply.github.com>
Co-authored-by: Makram <makramkd@users.noreply.github.com>
Co-authored-by: Domino Valdano <domino.valdano@smartcontract.com>
Co-authored-by: amit-momin <amit.momin@smartcontract.com>
Co-authored-by: Silas Lenihan <sjl@lenihan.net>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Chris De Leon <christopher.deleon@smartcontract.com>
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.

4 participants