-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Create Smoke Test for DON Time #19031
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
Merged
Merged
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
4d73ff7
Hook donTimeStore
DylanTinianov 60df926
Update time_provider.go
DylanTinianov b84f07a
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov e2a125a
Bump chainlink-common
DylanTinianov dd18ecc
Update time_provider.go
DylanTinianov f59a170
Update comments
DylanTinianov 031fddb
Update time_provider.go
DylanTinianov 16694b0
Add ctx to GetDONTime
DylanTinianov fa9f058
Error on failed DON Time call
DylanTinianov 41ffc17
Initialize dontimeStore
DylanTinianov e575c3e
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 4af9ee6
Bump common
DylanTinianov 827d57d
Bump common
DylanTinianov 20a059f
Fix ambiguous selector
DylanTinianov c9b5e29
Add provider
DylanTinianov 35ad4b6
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 2bcea3f
Bump
DylanTinianov 34b3433
lint
DylanTinianov 54981fa
Bump common
DylanTinianov 2175eab
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov fd8a495
Bump common
DylanTinianov 9673366
Add dontime store
DylanTinianov 40d06ca
Add dontime store
DylanTinianov 080659f
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 11f9bcc
Bump common
DylanTinianov caa6c9d
Bump common
DylanTinianov 31d5c8f
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 3317ff5
Bump common
DylanTinianov 5404f5a
Initialize TimeProvider
DylanTinianov d5e0ff2
Bump common
DylanTinianov fe0ad65
tidy
DylanTinianov d42b81a
lint
DylanTinianov 5cfcd3f
Pass dontime store
DylanTinianov df699aa
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 6423ab4
Bump common
DylanTinianov defd087
Update standalone_engine.go
DylanTinianov 4d9db4c
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 5f70a63
Create local time provider
DylanTinianov 3d29277
lint
DylanTinianov e6d1200
lint
DylanTinianov 2b0b625
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 1154738
Bump common
DylanTinianov fb145fc
modgraph
DylanTinianov 86d4fcf
Remove dontime from v1 Engine
DylanTinianov 5725e07
Remove dontime store from v1
DylanTinianov 22517da
Update standalone_engine.go
DylanTinianov b8f18f3
Update engine_test.go
DylanTinianov a9a2cd3
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 2cf3b3b
Add DonTime job spec
DylanTinianov 3490567
Update dontime job spec
DylanTinianov 4f2e7c4
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 2c1f236
Update definitions.go
DylanTinianov e95e92b
Update time_provider.go
DylanTinianov ac3812a
Add dontime capability
DylanTinianov bad4d3b
Trigger CI
DylanTinianov 4bf7367
Merge branch 'CAPPL-903-time-module-hook' of https://github.com/smart…
DylanTinianov f88c7a6
Bump common
DylanTinianov 99885a0
Bump common
DylanTinianov e8a1a2c
Add dontime plugin cmd
DylanTinianov db7207c
Add ocrKeys and transmitterID
DylanTinianov 49ae50b
Add DONTime to workflow
DylanTinianov b9fccb0
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 4fa1723
Try Initializing plugin in relay
DylanTinianov 269b809
Add plugin delegate
DylanTinianov a18babe
Merge branch 'CAPPL-903-time-module-hook' of https://github.com/smart…
DylanTinianov 464195c
Integrate DON Time with Local Env
DylanTinianov 6b558b9
Update delegate.go
DylanTinianov 0156af0
Bump common
DylanTinianov 2a4ab82
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 4a6ba2c
Fix duplicates
DylanTinianov aa20a25
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 2902f59
Bump common
DylanTinianov 9698401
Create DON Time Contract
DylanTinianov 04f183d
Use common addr
DylanTinianov bf3a1cd
Merge pull request #18928 from smartcontractkit/CAPPL-944-duplicate-c…
DylanTinianov 71b50c7
Remove comments
DylanTinianov 82ddb3d
Merge branch 'CAPPL-944-dontime-job-spec' of https://github.com/smart…
DylanTinianov 464facd
Use DON Time Provider
DylanTinianov c63a6da
Fix limits
DylanTinianov 0003b8c
Fix deployment sequence
DylanTinianov 1e8337c
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov bb1eca9
lint
DylanTinianov aecaeac
Secondary time hook
DylanTinianov 0453c1c
Bump common
DylanTinianov 90c9355
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov a326e8a
Bump common
DylanTinianov f826820
Revert defaults
DylanTinianov 8a9f462
Bump common
DylanTinianov 8df8051
Bump common
DylanTinianov 4ed1d7c
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 10db8c9
Remove context
DylanTinianov 5378609
Add smoke test TODO
DylanTinianov cc6c161
Use LocalTimeProvider for tests
DylanTinianov 5925ef0
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 5aa8324
Bump common + cre sdk
DylanTinianov 26ce28f
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov aa7f38d
Bump common + cre sdk
DylanTinianov ac5ca86
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 58696ba
Bump common + cre sdk
DylanTinianov ab6412d
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 8f79a9f
Bump cre sdk
DylanTinianov 6b71ca1
Bump dependencies
DylanTinianov fdbb157
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov f0604d7
comments
DylanTinianov dca4013
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov fe20959
Bump sdk
DylanTinianov 92e6e00
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 9ab8bb1
Create DonTime Test
DylanTinianov 50a3858
Merge
DylanTinianov 8bec66b
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov d0fb62e
Update v2_dontime_test.go
DylanTinianov d2b988c
Create DON Time smoke test
DylanTinianov 7187f38
Update v2_dontime_test.go
DylanTinianov ca64ca4
Verify consensus
DylanTinianov 0f44275
Create slimy-panthers-allow.md
DylanTinianov b8f61f5
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov a387be6
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov 7a1868a
Update test
DylanTinianov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "chainlink": patch | ||
| --- | ||
|
|
||
| #added smoke tests for DON Time in CRE Local Environment. #internal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
core/scripts/cre/environment/examples/workflows/v2/time_consensus/go.mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| module main | ||
|
|
||
| go 1.24.5 | ||
|
|
||
| toolchain go1.24.7 | ||
|
|
||
| require ( | ||
| github.com/smartcontractkit/cre-sdk-go v0.5.1-0.20250821154918-5c93d76162c5 | ||
| github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.5.1-0.20250821154918-5c93d76162c5 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/go-viper/mapstructure/v2 v2.4.0 // indirect | ||
| github.com/kr/pretty v0.3.1 // indirect | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
| github.com/rogpeppe/go-internal v1.13.1 // indirect | ||
| github.com/shopspring/decimal v1.4.0 // indirect | ||
| github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d // indirect | ||
| github.com/stretchr/testify v1.10.0 // indirect | ||
| google.golang.org/protobuf v1.36.7 // indirect | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| ) |
37 changes: 37 additions & 0 deletions
37
core/scripts/cre/environment/examples/workflows/v2/time_consensus/go.sum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
| github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= | ||
| github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= | ||
| github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= | ||
| github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= | ||
| github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= | ||
| github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | ||
| github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= | ||
| github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||
| github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | ||
| github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | ||
| github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | ||
| github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
| github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= | ||
| github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= | ||
| github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= | ||
| github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= | ||
| github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= | ||
| github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d h1:MJS8HTB1h3w7qV+70ueWnTQlMG8mxDUV/GdQH54Rg6g= | ||
| github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q= | ||
| github.com/smartcontractkit/cre-sdk-go v0.5.1-0.20250821154918-5c93d76162c5 h1:aur7c3C1wZsJCmGOOWVnUkDcpKKpoNkulniSxsQAB0U= | ||
| github.com/smartcontractkit/cre-sdk-go v0.5.1-0.20250821154918-5c93d76162c5/go.mod h1:3UcpptqBmJs42bQ62pUQoqfGwbvVQvcdqlUMueicbqs= | ||
| github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.5.1-0.20250821154918-5c93d76162c5 h1:eg1xCOTNcihkVa1PAU3aT2vmMQTF78QGAbEJELXSU/c= | ||
| github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.5.1-0.20250821154918-5c93d76162c5/go.mod h1:UaZJB6YRx3rsuvEtZWJ9zFH/ap3gXz30BldsrpUrYfM= | ||
| github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= | ||
| github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= | ||
| google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= | ||
| google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= | ||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= | ||
| gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
55 changes: 55 additions & 0 deletions
55
core/scripts/cre/environment/examples/workflows/v2/time_consensus/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| //go:build wasip1 | ||
|
|
||
| package main | ||
|
|
||
| import ( | ||
| "errors" | ||
| "log/slog" | ||
| "time" | ||
|
|
||
| "github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron" | ||
| "github.com/smartcontractkit/cre-sdk-go/cre" | ||
| "github.com/smartcontractkit/cre-sdk-go/cre/wasm" | ||
| ) | ||
|
|
||
| type None struct{} | ||
|
|
||
| func main() { | ||
| wasm.NewRunner(func(configBytes []byte) (None, error) { | ||
| return None{}, nil | ||
| }).Run(RunSimpleCronWorkflow) | ||
| } | ||
|
|
||
| func RunSimpleCronWorkflow(_ None, _ *slog.Logger, _ cre.SecretsProvider) (cre.Workflow[None], error) { | ||
| workflows := cre.Workflow[None]{ | ||
| cre.Handler( | ||
| cron.Trigger(&cron.Config{Schedule: "*/30 * * * * *"}), | ||
| onTrigger, | ||
| ), | ||
| } | ||
| return workflows, nil | ||
| } | ||
|
|
||
| func onTrigger(cfg None, runtime cre.Runtime, _ *cron.Payload) (string, error) { | ||
| dontime1 := runtime.Now() | ||
| dontime2 := runtime.Now() | ||
|
|
||
| if !dontime2.After(dontime1) { | ||
| return "", errors.New("DON time not increasing") | ||
| } | ||
| promise := cre.RunInNodeMode(cfg, runtime, | ||
| func(cfg None, nodeRuntime cre.NodeRuntime) (time.Time, error) { | ||
| return dontime1, nil | ||
| }, | ||
| cre.ConsensusIdenticalAggregation[time.Time](), | ||
| ) | ||
|
|
||
| _, err := promise.Await() | ||
| if err != nil { | ||
| runtime.Logger().Error("Failed to get identical consensus on DON Time") | ||
| return "", err | ||
| } | ||
|
|
||
| runtime.Logger().Info("Verified consensus on DON Time") | ||
| return "Verified consensus on DON Time", nil | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.