[KS-241] Update metadata passed to Forwarder and Receiver#13389
Merged
[KS-241] Update metadata passed to Forwarder and Receiver#13389
Conversation
1 task
archseer
reviewed
Jun 3, 2024
archseer
reviewed
Jun 3, 2024
archseer
reviewed
Jun 3, 2024
archseer
reviewed
Jun 3, 2024
archseer
reviewed
Jun 3, 2024
DeividasK
reviewed
Jun 3, 2024
DeividasK
reviewed
Jun 3, 2024
DeividasK
reviewed
Jun 3, 2024
Comment on lines
+83
to
+89
| // workflow_name // offset 64, size 10 | ||
| // workflow_owner // offset 74, size 20 | ||
| // report_name // offset 94, size 2 |
Contributor
There was a problem hiding this comment.
This is 32 bytes total. You could return just the 32 bytes and do an equality comparison (even a hash is not needed).
Contributor
Author
There was a problem hiding this comment.
This might be tough when we allow multiple owners and/or names.
jhweintraub
reviewed
Jun 4, 2024
jhweintraub
reviewed
Jun 4, 2024
archseer
previously approved these changes
Jun 5, 2024
DeividasK
reviewed
Jun 5, 2024
|
|
||
| bytes32 reportId = _reportId(receiverAddress, workflowExecutionId); | ||
| if (s_reports[reportId].transmitter != address(0)) revert ReportAlreadyProcessed(reportId); | ||
| bytes32 combinedId = _combinedId(receiverAddress, workflowExecutionId, reportId); |
Contributor
There was a problem hiding this comment.
Inconsistent naming
Suggested change
| bytes32 combinedId = _combinedId(receiverAddress, workflowExecutionId, reportId); | |
| bytes32 messageId = _combinedId(receiverAddress, workflowExecutionId, reportId); |
I would prefer transmissionId. We can fix in a follow-up.
DeividasK
reviewed
Jun 5, 2024
| // workflow_owner // offset 119, size 20 | ||
| // report_name // offset 139, size 2 | ||
| if (uint8(rawReport[0]) != 1) { | ||
| revert InvalidVersion(uint8(rawReport[0])); |
Contributor
There was a problem hiding this comment.
As discussed, we don't need this validation today. We can fix it in a follow-up.
DeividasK
reviewed
Jun 5, 2024
| bytes10[] internal s_allowedWorkflowNamesList; | ||
| mapping(bytes10 => bool) internal s_allowedWorkflowNames; | ||
|
|
||
| function setConfig( |
Contributor
There was a problem hiding this comment.
This is not efficient (I understand it is just an example). We can fix it in a follow-up gas optimization PR.
DeividasK
approved these changes
Jun 5, 2024
Contributor
DeividasK
left a comment
There was a problem hiding this comment.
LGTM. I will address polish comments in a follow-up PR.
archseer
approved these changes
Jun 5, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.