-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
BCF-2654 chain reader get latest value evm poc WIP #11272
Closed
Closed
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
a72f6e4
Implement skeleton interfaces, structs, & methods for ChainReader EVM…
reductionista d8bae2a
Read ChainReader config in from RelayConfig
reductionista e87c6dd
Use medianProviderWrapper instead of passing medianContract separately
reductionista 36b8c95
Update relay & .tools-version
reductionista 43bd0e7
Add chain_reader_test.go stub for relay tests
reductionista e824b63
Some minor PR suggestions
reductionista 51fa7d2
Return error messages from newChainReader instead of nil on failure
reductionista 60cd2b3
err.Error() -> err
reductionista 895d21a
Fix "unimplemented method" bug
reductionista c6f4d66
Add chain reader config validation
ilija42 d4eb5af
Add chain reader config validation tests
ilija42 32a468c
minor fix in chain_reader_test.go
ilija42 efb3e09
Fix chainReader = nil bug
reductionista 1b6e4ae
Restore medianContract to evm relay
reductionista f4dda80
Fix lint errors, re-run go mod tidy
reductionista 187ee9a
Add config for chain reader median contract to cr validation testcases
ilija42 1b367ae
Add unimplemented Encode(), Decode(), GetMaxEncodingSize(), GetMaxDec…
reductionista f187123
goimports -local github.com/smartcontractkit/chainlink ./core/service…
reductionista 5625c4a
Add ChainReader() method to mock provider for plugin test
reductionista 7fce04a
Replace relay refs in go.mod files
reductionista 5a983a2
Changes to chain reader constructor and add more tests
ilija42 acdcd1f
Add method to JSONCONFIG that allows us to marshal embedded json struct
ilija42 9393d07
Fix median contract response structs to match abi for easier decoding
ilija42 5e101de
Register lp filter for chain reader in median provider constructor
ilija42 f5f87c4
Add ChainReader GetLatestValue EVM implementation
ilija42 7b48083
Change integration tests ocr2 helpers to include chainReader bool flag
ilija42 62fe5e4
Add ocr2 basic with chainReader smoke test
ilija42 e7228ae
Refactor GetLatestValue to be more readable
ilija42 cee0973
Change usage of errors.Wrap() to fmt.Errorf()
ilija42 387ea20
ADD TODOS to chainReader GetLatestValue
ilija42 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 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
golang 1.21.1 | ||
golang 1.21.3 | ||
mockery 2.35.4 | ||
nodejs 16.16.0 | ||
postgres 13.3 | ||
|
This file contains 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 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 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 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 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 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 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilija42 Looking at the details of this now, I think this modification is happening too high up the call-stack. Have you considered adding a shim around median.NumericalMedianFactory that overrides the median contract with a ChainReader based implementation? This would behave almost like what @reductionista described as the ideal suggestion, which would be to modify median directly.
I think implementing it that way has a couple of advantages:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cedric-cordenier sry, completely missed this. This makes sense to me, I will change this in the final POC version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I also missed this somehow till today, despite being tagged!
I don't see a problem with this, but curious to understand the motivation better.
What other users of
NumericalMedianFactory
would there be aside from the Median plugin? Is the issue just that for migration you need a separate implementation of Median plugin to co-exist with the current one? Or is it more than that?