-
Notifications
You must be signed in to change notification settings - Fork 16
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
Change PluginMedian Interface #166
Closed
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f56670e
change interface
augustbleeds 3e033ff
change signature for median factory
augustbleeds f8416cd
Merge branch 'main' into augustus.gas-prices-changes
augustbleeds c988207
serve gasPrice over grpc
augustbleeds c7bc6d8
update protobuf
augustbleeds 0aa1d2d
add tests
augustbleeds 7e621d3
Merge branch 'main' into augustus.gas-prices-changes
augustbleeds e51f862
lint fix
augustbleeds c604ab9
change to noop data source
augustbleeds 852340c
merge main
augustbleeds cde3993
handle noop
augustbleeds 02e97ec
use nil instead of err to rep noop
augustbleeds 0837829
refactor tests
augustbleeds 7c8f64f
Merge branch 'main' into augustus.gas-prices-changes
augustbleeds cb35a68
change noop to return 0
augustbleeds 1e2185e
merge main
augustbleeds d57e9a8
try both static and noop
augustbleeds c9277a3
fix test
augustbleeds 3220036
Merge branch 'main' into augustus.gas-prices-changes
augustbleeds 9346ac9
point to new libocr
augustbleeds b6579c9
update libocr
augustbleeds 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
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.
What is gas price used for? That seems like a chain-specific detail that shouldn't leak out here.
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.
It's a data source which tells us how much the gas price is on the chain during a report transmission (for chains which do not support onchain methods of retrieving gas price). It's part of the transmission structure similar to juelsPerFee so it's actually a value which is transmitted to the block-chain as a part of the median plugin.
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.
Example of it on Starknet
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.
Not all chains require it (like EVM chains), so if it is nil then ocr will not include it in a transmission
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.
But why are these low-level chain-specific details leaking out of the relayer at all? Core and chain-agnostic product code shouldn't need to concern itself with these kinds of details.
Why is a pipeline being used to retrieve this data?
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.
Do other chain families all use the word
gas
though? I can't actually find any other terminology, so maybe nbd 🤷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.
cosmos and ethereum L2s do. I believe solana operates differently and calls them "tx fees"
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.
Can you explain how the gas price data source is going to be instantiated? We are actively working to put all chain-specific details in the relayer, and I want to make sure that we aren't taking a step back here.
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.
The data source is another pipeline so it would be instantiated here https://github.com/smartcontractkit/chainlink/pull/10519/files#diff-7358f3249bf57875121f3bcb6211722cf2bee2f9b411dfff89a1974c48c5b67eR109.
A chain either has one or it doesn't so it's either nil or it's not. There's https://github.com/smartcontractkit/chainlink-relay/pull/166/files#diff-28ea9d6d17fb7499fbbd0f83828a8335ac28eacff629256d75b261bdb2ee123aR59 also when the loopp plugin serves the underlying data source. Would this be a step backward?
^ If data sources were to be instantiated in the relayer, that means configuration would also occur in the relayer. The infra doesn't exist, but if it were to exist you'd pass in pipeline configs from core to the relay and relay would instantiate them.
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.
We reimburse
transmit
calls on chain. In order to do that correctly a reimbursement has to be calculated. This is easy in EVM where we can accesstx.gasPrice
in Solidity as well as measuregasleft()
at the start and end of execution. But in basically every non-EVM chain this data isn't sourceable and we need to do two things:juelsPerFeeCoin
source usage)We were able to avoid this second one because:
This
gasPrice
source is needed for both Starknet and Cosmos.