Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas prices Data Source Changes #10489

Closed
wants to merge 16 commits into from

Conversation

augustbleeds
Copy link
Contributor

@augustbleeds augustbleeds commented Sep 5, 2023

This PR does the following:

  • Updates plugin config to accept optional gas price data source string
  • Instantiate a new median factory (both loopp and legacy plugins) with gas price data source
  • Updates ORM method to save a median plugin pipeline

Related PRs:

  • PR Merge Order (from top to bottom in order)
    1. libocr
      • NumericalMedianFactory gets changed to have a gas price data source
      • Note: (If someone bumps libocr in core, median factory will need to be updated with nil)
      • Note: (You will not be able to bump libocr in chainlink-relay until the below PR gets merged)
    2. chainlink-relay
      • Currently uses the replace directive, once libocr is merged we remove replace directive and bump the version of libocr
      • The plugin median interface is updated to include gas price data source
      • Begins the grpc service for gas price data source
      • Note: (You cannot bump chainlink-relay in chainlink repo until the PR below bets merged)
    3. chainlink-feeds
    4. chainlink
      • Uses replace directive for both chainlink-relay and libocr. They should get updated when the respective repos get updated
      • Parses TOML config for (optional) gas price data source and passes it into median factory.

@augustbleeds augustbleeds marked this pull request as draft September 5, 2023 14:24
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

I see that you haven't updated any README files. Would it make sense to do so?

@augustbleeds
Copy link
Contributor Author

retest

@augustbleeds augustbleeds marked this pull request as ready for review September 5, 2023 16:12
@augustbleeds augustbleeds force-pushed the augustus.gas-prices-median-reporting branch from 3fba394 to 640a094 Compare September 5, 2023 16:47
@augustbleeds augustbleeds reopened this Sep 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

@augustbleeds augustbleeds changed the title DRAFT: Gas prices change Gas prices Data Source Changes Sep 8, 2023
@@ -1,7 +1,7 @@
golang 1.20.4
mockery 2.28.1
nodejs 16.16.0
postgres 13.3
postgres 15.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will remove before PR is ready to be merged... I do this because I test against postgres 15 locally

@@ -282,16 +282,27 @@ func (o *orm) CreateJob(jb *Job, qopts ...pg.QOpt) error {

if jb.OCR2OracleSpec.PluginType == types.Median {
var cfg medianconfig.PluginConfig
validatePipeline := func(s string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

simplify plugin pipeline validation logic

}

// ValidatePluginConfig validates the arguments for the Median plugin.
func ValidatePluginConfig(config PluginConfig) error {
func (config *PluginConfig) ValidatePluginConfig() error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

made these methods instead of functions

@@ -121,11 +131,11 @@ func NewMedianServices(ctx context.Context,
abort()
return
}
median := loop.NewMedianService(lggr, telem, cmdFn, medianProvider, dataSource, juelsPerFeeCoinSource, errorLog)
median := loop.NewMedianService(lggr, telem, cmdFn, medianProvider, dataSource, juelsPerFeeCoinSource, gasPriceDataSource, errorLog)
Copy link
Contributor Author

@augustbleeds augustbleeds Sep 8, 2023

Choose a reason for hiding this comment

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

data source should work with both loopp and legacy plugins.

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition B Maintainability Rating on New Code (is worse than A)
Failed condition 8.21% Technical Debt Ratio on New Code (is greater than 4%)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@@ -106,11 +107,20 @@ func NewMedianServices(ctx context.Context,
runResults,
chEnhancedTelem,
), ocrcommon.NewInMemoryDataSource(pipelineRunner, jb, pipeline.Spec{
ID: jb.ID,
ID: jb.ID, // why do we choose the same job id for getting juelsperfee number as the data source?
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an issue we need to fix? or document in a ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just a question i had. I think I found the answer: they're part of the same job. ( will delete comment)

Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 18, 2023
@github-actions github-actions bot closed this Nov 26, 2023
@augustbleeds augustbleeds reopened this Jan 10, 2024
@github-actions github-actions bot removed the Stale label Jan 11, 2024
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition B Maintainability Rating on New Code (is worse than A)
Failed condition 0.0% 0.0% Coverage on New Code (is less than 75%)
Failed condition 8.68% Technical Debt Ratio on New Code (is greater than 4%)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@RensR
Copy link
Contributor

RensR commented Jan 22, 2024

I assume the Foundry dependency change is not intentional? If not, please undo it.

@augustbleeds
Copy link
Contributor Author

I assume the Foundry dependency change is not intentional? If not, please undo it.

yeah, it was an artifact of testing unrelated changes. I'll remove it

Copy link
Contributor

github-actions bot commented Apr 9, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 9, 2024
@github-actions github-actions bot closed this Apr 17, 2024
@augustbleeds augustbleeds deleted the augustus.gas-prices-median-reporting branch May 23, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants