-
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
[Functions] Remove OCR Config Digest check #11249
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
} | ||
|
||
// Bounded by "MaxRequestBatchSize" on the Job's ReportingPluginConfig | ||
for (uint256 i = 0; i < requestIds.length; ++i) { | ||
for (uint256 i = 0; i < numberOfFulfillments; ++i) { |
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.
Let's not mix completely unrelated changes. Send out a separate PR for readability. Same for FunctionsBilling.sol.
@@ -19,9 +19,6 @@ abstract contract OCR2Base is ConfirmedOwner, OCR2Abstract { | |||
i_uniqueReports = uniqueReports; |
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 were planning to remove unique reports, right?
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.
Right
// solhint-disable-next-line custom-errors | ||
require(configInfo.latestConfigDigest == configDigest, "configDigest mismatch"); | ||
// The following check is disabled to allow both current and proposed routes to submit reports using the same OCR config digest | ||
// Replay attacks are not a risk to Chanlink Functions because |
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.
Instead of calling out replay attacks you can make a more generic statement that request IDs are globally unique and validated in Coordinator.
Also typo "Chanlink".
@@ -320,8 +316,10 @@ abstract contract OCR2Base is ConfirmedOwner, OCR2Abstract { | |||
emit Transmitted(configDigest, uint32(epochAndRound >> 8)); | |||
|
|||
ConfigInfo memory configInfo = s_configInfo; |
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 we need this line?
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 is used when determining the minimum signers, but I checked it with and without, it's cheaper gas-wise without.
// solhint-disable-next-line custom-errors | ||
require(rs.length == ss.length, "signatures out of registration"); | ||
if (rs.length != expectedNumSignatures) revert ReportInvalid("wrong number of signatures"); | ||
if (rs.length != ss.length) revert ReportInvalid("signatures out of registration"); |
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.
This error message is confusing to me, what does it mean "out of registration" :) Maybe @stchrysa can help re-word.
32ddb86
to
9e40ca8
Compare
9e40ca8
to
7ed2b3e
Compare
Go solidity wrappers are out-of-date, regenerate them via the |
1 similar comment
Go solidity wrappers are out-of-date, regenerate them via the |
d415dab
to
865a47d
Compare
@@ -151,7 +151,9 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli | |||
numberOfFulfillments != onchainMetadata.length || | |||
numberOfFulfillments != offchainMetadata.length | |||
) { | |||
revert ReportInvalid(); | |||
revert ReportInvalid( | |||
"All fields on the report must be equal: requestIds, results, errors, onchainMetadata, offchainMetadata" |
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.
nit: "of equal length"
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.
Changed it
865a47d
to
2506452
Compare
SonarQube Quality Gate |
No description provided.