Skip to content

Commit

Permalink
[chore] Fix incorrect jobID in RequestRoundTracker (#14811)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier authored Oct 16, 2024
1 parent 6275bd9 commit 650b827
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/prometheus/client_golang v1.20.0
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chainlink-automation v0.8.0
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.0 h1:hFz2EHU06bkEfhcqhK8Jd
github.com/smartcontractkit/chainlink-automation v0.8.0/go.mod h1:ObdjDfgGIaiE48Bb3yYcx1CeGBm392WlEw92U83LlUA=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7 h1:aMG3BllvgeL/vsqkebuAhWoIWOnitKnN1VxibdzGnYo=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7/go.mod h1:H4BTXnZBhwRdsAFjqWZpB1/f3IZnuB/Ql7pXPmokzXg=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8 h1:rF8Vh9QXGXANnCs8Jl5o4Wp9mlkeVqKu0NohP9oWSII=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2 h1:WERgv6CtOMVLCa0d1YhO3BrP94TwDT+QSVKvH5PZ5Xw=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-cosmos v0.5.1 h1:2xeZWh+4/w7xalTdAu8jqgFuxZ291aYTEwZhlQEv/BY=
github.com/smartcontractkit/chainlink-cosmos v0.5.1/go.mod h1:c1wUtVxXUqW4PzuCQhuHaBDZFv9XAQjhKTqam7GLGIU=
github.com/smartcontractkit/chainlink-data-streams v0.1.0 h1:wcRJRm7eqfbgN+Na+GjAe0/IUn6XwmSagFHqIWHHBGk=
Expand Down
3 changes: 2 additions & 1 deletion core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ func (d *Delegate) newServicesGenericPlugin(

provider, err := relayer.NewPluginProvider(ctx, types.RelayArgs{
ExternalJobID: jb.ExternalJobID,
JobID: spec.ID,
JobID: jb.ID,
OracleSpecID: spec.ID,
ContractID: spec.ContractID,
New: d.isNewlyCreatedJob,
RelayConfig: spec.RelayConfig.Bytes(),
Expand Down
2 changes: 1 addition & 1 deletion core/services/ocr2/plugins/median/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func NewMedianServices(ctx context.Context,
cfg MedianConfig,
chEnhancedTelem chan ocrcommon.EnhancedTelemetryData,
errorLog loop.ErrorLog,

) (srvs []job.ServiceCtx, err error) {
var pluginConfig config.PluginConfig
err = json.Unmarshal(jb.OCR2OracleSpec.PluginConfig.Bytes(), &pluginConfig)
Expand All @@ -86,6 +85,7 @@ func NewMedianServices(ctx context.Context,
provider, err := relayer.NewPluginProvider(ctx, types.RelayArgs{
ExternalJobID: jb.ExternalJobID,
JobID: jb.ID,
OracleSpecID: *jb.OCR2OracleSpecID,
ContractID: spec.ContractID,
New: isNewlyCreatedJob,
RelayConfig: spec.RelayConfig.Bytes(),
Expand Down
2 changes: 1 addition & 1 deletion core/services/relay/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ func (r *Relayer) NewMedianProvider(ctx context.Context, rargs commontypes.Relay
return nil, err
}

medianContract, err := newMedianContract(configWatcher.ContractConfigTracker(), configWatcher.contractAddress, configWatcher.chain, rargs.JobID, r.ds, lggr)
medianContract, err := newMedianContract(configWatcher.ContractConfigTracker(), configWatcher.contractAddress, configWatcher.chain, rargs.JobID, rargs.OracleSpecID, r.ds, lggr)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions core/services/relay/evm/median.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type medianContract struct {
requestRoundTracker *RequestRoundTracker
}

func newMedianContract(configTracker types.ContractConfigTracker, contractAddress common.Address, chain legacyevm.Chain, specID int32, ds sqlutil.DataSource, lggr logger.Logger) (*medianContract, error) {
func newMedianContract(configTracker types.ContractConfigTracker, contractAddress common.Address, chain legacyevm.Chain, jobID int32, oracleSpecID int32, ds sqlutil.DataSource, lggr logger.Logger) (*medianContract, error) {
lggr = logger.Named(lggr, "MedianContract")
contract, err := offchain_aggregator_wrapper.NewOffchainAggregator(contractAddress, chain.Client())
if err != nil {
Expand All @@ -57,10 +57,10 @@ func newMedianContract(configTracker types.ContractConfigTracker, contractAddres
contractFilterer,
chain.Client(),
chain.LogBroadcaster(),
specID,
jobID,
lggr,
ds,
NewRoundRequestedDB(ds, specID, lggr),
NewRoundRequestedDB(ds, oracleSpecID, lggr),
chain.Config().EVM(),
),
}, nil
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.27
github.com/smartcontractkit/chainlink-automation v0.8.0
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2
github.com/smartcontractkit/chainlink-cosmos v0.5.1
github.com/smartcontractkit/chainlink-data-streams v0.1.0
github.com/smartcontractkit/chainlink-feeds v0.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.0 h1:hFz2EHU06bkEfhcqhK8Jd
github.com/smartcontractkit/chainlink-automation v0.8.0/go.mod h1:ObdjDfgGIaiE48Bb3yYcx1CeGBm392WlEw92U83LlUA=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7 h1:aMG3BllvgeL/vsqkebuAhWoIWOnitKnN1VxibdzGnYo=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7/go.mod h1:H4BTXnZBhwRdsAFjqWZpB1/f3IZnuB/Ql7pXPmokzXg=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8 h1:rF8Vh9QXGXANnCs8Jl5o4Wp9mlkeVqKu0NohP9oWSII=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2 h1:WERgv6CtOMVLCa0d1YhO3BrP94TwDT+QSVKvH5PZ5Xw=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-cosmos v0.5.1 h1:2xeZWh+4/w7xalTdAu8jqgFuxZ291aYTEwZhlQEv/BY=
github.com/smartcontractkit/chainlink-cosmos v0.5.1/go.mod h1:c1wUtVxXUqW4PzuCQhuHaBDZFv9XAQjhKTqam7GLGIU=
github.com/smartcontractkit/chainlink-data-streams v0.1.0 h1:wcRJRm7eqfbgN+Na+GjAe0/IUn6XwmSagFHqIWHHBGk=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.27
github.com/smartcontractkit/chainlink-automation v0.8.0
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2
github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.0
github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.11-0.20241011153842-b2804aed25b4
github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.0 h1:hFz2EHU06bkEfhcqhK8Jd
github.com/smartcontractkit/chainlink-automation v0.8.0/go.mod h1:ObdjDfgGIaiE48Bb3yYcx1CeGBm392WlEw92U83LlUA=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7 h1:aMG3BllvgeL/vsqkebuAhWoIWOnitKnN1VxibdzGnYo=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7/go.mod h1:H4BTXnZBhwRdsAFjqWZpB1/f3IZnuB/Ql7pXPmokzXg=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8 h1:rF8Vh9QXGXANnCs8Jl5o4Wp9mlkeVqKu0NohP9oWSII=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2 h1:WERgv6CtOMVLCa0d1YhO3BrP94TwDT+QSVKvH5PZ5Xw=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-cosmos v0.5.1 h1:2xeZWh+4/w7xalTdAu8jqgFuxZ291aYTEwZhlQEv/BY=
github.com/smartcontractkit/chainlink-cosmos v0.5.1/go.mod h1:c1wUtVxXUqW4PzuCQhuHaBDZFv9XAQjhKTqam7GLGIU=
github.com/smartcontractkit/chainlink-data-streams v0.1.0 h1:wcRJRm7eqfbgN+Na+GjAe0/IUn6XwmSagFHqIWHHBGk=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.33.0
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2
github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.11-0.20241011153842-b2804aed25b4
github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1381,8 +1381,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.0 h1:hFz2EHU06bkEfhcqhK8Jd
github.com/smartcontractkit/chainlink-automation v0.8.0/go.mod h1:ObdjDfgGIaiE48Bb3yYcx1CeGBm392WlEw92U83LlUA=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7 h1:aMG3BllvgeL/vsqkebuAhWoIWOnitKnN1VxibdzGnYo=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20241014104242-9227e5c976a7/go.mod h1:H4BTXnZBhwRdsAFjqWZpB1/f3IZnuB/Ql7pXPmokzXg=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8 h1:rF8Vh9QXGXANnCs8Jl5o4Wp9mlkeVqKu0NohP9oWSII=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241015141757-516fee04cae8/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2 h1:WERgv6CtOMVLCa0d1YhO3BrP94TwDT+QSVKvH5PZ5Xw=
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241016173514-b7b7f6310ac2/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko=
github.com/smartcontractkit/chainlink-cosmos v0.5.1 h1:2xeZWh+4/w7xalTdAu8jqgFuxZ291aYTEwZhlQEv/BY=
github.com/smartcontractkit/chainlink-cosmos v0.5.1/go.mod h1:c1wUtVxXUqW4PzuCQhuHaBDZFv9XAQjhKTqam7GLGIU=
github.com/smartcontractkit/chainlink-data-streams v0.1.0 h1:wcRJRm7eqfbgN+Na+GjAe0/IUn6XwmSagFHqIWHHBGk=
Expand Down

0 comments on commit 650b827

Please sign in to comment.