-
Notifications
You must be signed in to change notification settings - Fork 56
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
refactor: elcontracts/reader
interface
#465
refactor: elcontracts/reader
interface
#465
Conversation
…oken and update tests. change logic in writer, need to review after this PR
…estHash and update tests.
…onDigestHash and update tests. change logic in writer, need to review after this PR
…tamp and update tests.
…nRoot and update tests.
…and update tests.
… IsOperatorRegisteredWithOperatorSet.
… GetSlashableSharesForOperatorSetsBefore.
…ets and update tests.
elcontracts
interfaceelcontracts/reader
interface
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.
LGTM, just leave you a comment:
@@ -161,17 +158,21 @@ func (w *ChainWriter) RegisterOperatorInQuorumWithAVSRegistryCoordinator( | |||
} | |||
|
|||
// params to register operator in delegation manager's operator-avs mapping | |||
msgToSign, err := w.elReader.CalculateOperatorAVSRegistrationDigestHash( | |||
// TODO: Review this function after finishing the refactor of the ChainReader |
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.
Question, should this line be left in? Or is the chainReader refactoring not finished yet? The same in the other call to elcontracts.CalculateOperatorAVSRegistrationDigestHashRequest
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.
Same in the TODO of elcontracts's ChainWriter related to this
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.
I added that comment because the avsregistry
and elcontracts/writer
refactors are being handled in separate PRs. It might be unnecessary to keep this comment since conflicts are expected during merging and will need to be handled regardless. So I will remove the comments!
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.
Done d110c54!
What Changed?
This PR aims to improve the
elcontracts/reader
interface by implementing a request-response pattern. For the exposed functions, we create structs that represent the request (specific fields +BlockNumber
) and the response.Because the function signatures change, we also refactor the tests to align with the new pattern.
Below is a simple example of the new request-response pattern:
Example:
This is a work in progress and changes may occur.
Reviewer Checklist