Skip to content

Commit

Permalink
add context
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Mar 13, 2024
1 parent 22812a0 commit ea2dc06
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 38 deletions.
18 changes: 11 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module github.com/smartcontractkit/chainlink-automation

go 1.21

toolchain go1.21.5

replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240311135254-702bd5bd3727

replace (
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.3
golang/github.com/gogo/protobuf => golang/github.com/gogo/protobuf v1.3.3
Expand All @@ -14,12 +18,13 @@ require (
github.com/google/uuid v1.3.1
github.com/jedib0t/go-pretty/v6 v6.4.7
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240118012339-4864e2306bb1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240313190927-9f7349158647
github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.17.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.18.0
gonum.org/v1/gonum v0.13.0
)

Expand All @@ -46,22 +51,21 @@ require (
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
29 changes: 14 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jedib0t/go-pretty/v6 v6.4.7 h1:lwiTJr1DEkAgzljsUsORmWsVn5MQjt1BPJdPCtJ6KXE=
github.com/jedib0t/go-pretty/v6 v6.4.7/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
github.com/jmank88/libocr v0.0.0-20240311135254-702bd5bd3727 h1:G9Djr4klIISnLqRgTOl75ay4PXb7BnxTl+JCCvk0Dm8=
github.com/jmank88/libocr v0.0.0-20240311135254-702bd5bd3727/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
Expand Down Expand Up @@ -139,24 +141,21 @@ github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKl
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240118012339-4864e2306bb1 h1:3cWO2/lFVDul5SVTgl4/RX/GXcT8Zq5NGMPeNEz09tY=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240118012339-4864e2306bb1/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66 h1:xsU00JB9GJxEiN6tDbqgN+fT98ySdxkUwTw6CfBXscw=
github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240313190927-9f7349158647 h1:1tvpNyjI9d590SH3KFoYTbhWOWt0E6xzDSR5BClgzpw=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240313190927-9f7349158647/go.mod h1:xZmkdvdylcXwU3jHNREG2KAwKzDFkUfHtDwXyc8ISOY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
Expand All @@ -171,22 +170,22 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ=
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
Expand Down
3 changes: 2 additions & 1 deletion pkg/v2/factory.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ocr2keepers

import (
"context"
"fmt"
"log"

Expand Down Expand Up @@ -58,7 +59,7 @@ type pluginFactory struct {
logger *log.Logger
}

func (f *pluginFactory) NewReportingPlugin(c types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
func (f *pluginFactory) NewReportingPlugin(ctx context.Context, c types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
f.logger.Printf("creating new reporting plugin instance")

offChainCfg, err := config.DecodeOffchainConfig(c.OffchainConfig)
Expand Down
6 changes: 4 additions & 2 deletions pkg/v3/plugin/factory.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package plugin

import (
"context"
"fmt"
"log"
"math"
"math/cmplx"
"strconv"

"github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types"

ocr2keepers "github.com/smartcontractkit/chainlink-automation/pkg/v3"
"github.com/smartcontractkit/chainlink-automation/pkg/v3/config"
"github.com/smartcontractkit/chainlink-automation/pkg/v3/runner"
"github.com/smartcontractkit/chainlink-automation/pkg/v3/types"
commontypes "github.com/smartcontractkit/chainlink-common/pkg/types/automation"
"github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types"
)

type pluginFactory struct {
Expand Down Expand Up @@ -63,7 +65,7 @@ func NewReportingPluginFactory(
}
}

func (factory *pluginFactory) NewReportingPlugin(c ocr3types.ReportingPluginConfig) (ocr3types.ReportingPlugin[AutomationReportInfo], ocr3types.ReportingPluginInfo, error) {
func (factory *pluginFactory) NewReportingPlugin(ctx context.Context, c ocr3types.ReportingPluginConfig) (ocr3types.ReportingPlugin[AutomationReportInfo], ocr3types.ReportingPluginInfo, error) {
info := ocr3types.ReportingPluginInfo{
Name: fmt.Sprintf("Oracle: %d: Automation Plugin Instance w/ Digest '%s'", c.OracleID, c.ConfigDigest),
Limits: ocr3types.ReportingPluginLimits{
Expand Down
8 changes: 4 additions & 4 deletions pkg/v3/plugin/ocr3.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ func (plugin *ocr3Plugin) Observation(ctx context.Context, outctx ocr3types.Outc
return observation.Encode()
}

func (plugin *ocr3Plugin) ObservationQuorum(outctx ocr3types.OutcomeContext, query ocr2plustypes.Query) (ocr3types.Quorum, error) {
func (plugin *ocr3Plugin) ObservationQuorum(ctx context.Context, outctx ocr3types.OutcomeContext, query ocr2plustypes.Query) (ocr3types.Quorum, error) {
return ocr3types.QuorumTwoFPlusOne, nil
}

func (plugin *ocr3Plugin) ValidateObservation(outctx ocr3types.OutcomeContext, query ocr2plustypes.Query, ao ocr2plustypes.AttributedObservation) error {
func (plugin *ocr3Plugin) ValidateObservation(ctx context.Context, outctx ocr3types.OutcomeContext, query ocr2plustypes.Query, ao ocr2plustypes.AttributedObservation) error {
plugin.Logger.Printf("inside ValidateObservation for seqNr %d", outctx.SeqNr)
_, err := ocr2keepersv3.DecodeAutomationObservation(ao.Observation, plugin.UpkeepTypeGetter, plugin.WorkIDGenerator)
return err
}

func (plugin *ocr3Plugin) Outcome(outctx ocr3types.OutcomeContext, query ocr2plustypes.Query, attributedObservations []ocr2plustypes.AttributedObservation) (ocr3types.Outcome, error) {
func (plugin *ocr3Plugin) Outcome(ctx context.Context, outctx ocr3types.OutcomeContext, query ocr2plustypes.Query, attributedObservations []ocr2plustypes.AttributedObservation) (ocr3types.Outcome, error) {
plugin.Logger.Printf("inside Outcome for seqNr %d", outctx.SeqNr)
p := newPerformables(plugin.F+1, ocr2keepersv3.OutcomeAgreedPerformablesLimit, getRandomKeySource(plugin.ConfigDigest, outctx.SeqNr), plugin.Logger)
c := newCoordinatedBlockProposals(plugin.F+1, ocr2keepersv3.OutcomeSurfacedProposalsRoundHistoryLimit, ocr2keepersv3.OutcomeSurfacedProposalsLimit, getRandomKeySource(plugin.ConfigDigest, outctx.SeqNr), plugin.Logger)
Expand Down Expand Up @@ -133,7 +133,7 @@ func (plugin *ocr3Plugin) Outcome(outctx ocr3types.OutcomeContext, query ocr2plu
return outcome.Encode()
}

func (plugin *ocr3Plugin) Reports(seqNr uint64, raw ocr3types.Outcome) ([]ocr3types.ReportWithInfo[AutomationReportInfo], error) {
func (plugin *ocr3Plugin) Reports(ctx context.Context, seqNr uint64, raw ocr3types.Outcome) ([]ocr3types.ReportWithInfo[AutomationReportInfo], error) {
plugin.Logger.Printf("inside Reports for seqNr %d", seqNr)
var (
reports []ocr3types.ReportWithInfo[AutomationReportInfo]
Expand Down
6 changes: 3 additions & 3 deletions pkg/v3/plugin/ocr3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ func TestOcr3Plugin_ValidateObservation(t *testing.T) {
UpkeepTypeGetter: mockUpkeepTypeGetter,
WorkIDGenerator: tc.wg,
}
err := plugin.ValidateObservation(ocr3types.OutcomeContext{}, nil, tc.observation)
err := plugin.ValidateObservation(context.Background(), ocr3types.OutcomeContext{}, nil, tc.observation)
if tc.expectsErr {
assert.Error(t, err)
assert.Equal(t, err.Error(), tc.wantErr.Error())
Expand Down Expand Up @@ -1093,7 +1093,7 @@ func TestOcr3Plugin_Outcome(t *testing.T) {
WorkIDGenerator: tc.wg,
Logger: logger,
}
outcome, err := plugin.Outcome(ocr3types.OutcomeContext{
outcome, err := plugin.Outcome(context.Background(), ocr3types.OutcomeContext{
PreviousOutcome: tc.prevOutcome,
}, nil, tc.observations)
if tc.expectsErr {
Expand Down Expand Up @@ -1274,7 +1274,7 @@ func TestOcr3Plugin_Reports(t *testing.T) {
UpkeepTypeGetter: tc.utg,
WorkIDGenerator: tc.wg,
}
reportsWithInfo, err := plugin.Reports(tc.sequenceNumber, tc.outcome)
reportsWithInfo, err := plugin.Reports(context.Background(), tc.sequenceNumber, tc.outcome)
if tc.expectsErr {
assert.Error(t, err)
assert.Equal(t, err.Error(), tc.wantErr.Error())
Expand Down
9 changes: 5 additions & 4 deletions tools/simulator/simulate/loader/ocr3config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package loader

import (
"context"
"log"
"sync"

Expand All @@ -27,7 +28,7 @@ type OffchainKeySourcer interface {
}

type Digester interface {
ConfigDigest(config types.ContractConfig) (types.ConfigDigest, error)
ConfigDigest(ctx context.Context, config types.ContractConfig) (types.ConfigDigest, error)
}

type ProgressTelemetry interface {
Expand Down Expand Up @@ -79,7 +80,7 @@ func (l *OCR3ConfigLoader) Load(block *chain.Block) {

// check if new block indicates a new config event should be loaded
if evt, ok := l.events[block.Number.String()]; ok {
conf, err := buildConfig(evt, l.oracles, l.digest, l.count+1)
conf, err := buildConfig(context.Background(), evt, l.oracles, l.digest, l.count+1)
if err != nil {
l.logger.Printf("error building config: %s", err)

Expand Down Expand Up @@ -117,7 +118,7 @@ func (l *OCR3ConfigLoader) AddSigner(id string, onKey KeySourcer, offKey Offchai
l.oracles = append(l.oracles, newOracle)
}

func buildConfig(conf config.OCR3ConfigEvent, oracles []ocr2config.OracleIdentityExtra, digester Digester, count uint64) (types.ContractConfig, error) {
func buildConfig(ctx context.Context, conf config.OCR3ConfigEvent, oracles []ocr2config.OracleIdentityExtra, digester Digester, count uint64) (types.ContractConfig, error) {
// S is a slice of values that indicate the number of oracles involved
// in attempting to transmit. For the simulator, all nodes will be involved
// in transmit attempts.
Expand Down Expand Up @@ -159,7 +160,7 @@ func buildConfig(conf config.OCR3ConfigEvent, oracles []ocr2config.OracleIdentit
OffchainConfig: offchainConfig,
}

digest, _ := digester.ConfigDigest(contractConf)
digest, _ := digester.ConfigDigest(ctx, contractConf)
contractConf.ConfigDigest = digest

return contractConf, nil
Expand Down
3 changes: 2 additions & 1 deletion tools/simulator/simulate/loader/ocr3config_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package loader_test

import (
"context"
"crypto/rand"
"crypto/sha256"
"fmt"
Expand Down Expand Up @@ -59,7 +60,7 @@ type mockDigester struct {
mock.Mock
}

func (_m *mockDigester) ConfigDigest(config types.ContractConfig) (types.ConfigDigest, error) {
func (_m *mockDigester) ConfigDigest(ctx context.Context, config types.ContractConfig) (types.ConfigDigest, error) {
req := _m.Called(config)

hash := sha256.Sum256([]byte(fmt.Sprintf("%+v", config)))
Expand Down
2 changes: 1 addition & 1 deletion tools/simulator/simulate/ocr/transmit.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (tr *OCR3Transmitter) Transmit(
}

// Account from which the transmitter invokes the contract
func (tr *OCR3Transmitter) FromAccount() (types.Account, error) {
func (tr *OCR3Transmitter) FromAccount(ctx context.Context) (types.Account, error) {
tr.mu.RLock()
defer tr.mu.RUnlock()

Expand Down

0 comments on commit ea2dc06

Please sign in to comment.