-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: implement EboActor.onResponseProposed handler #19
Conversation
GRT-82 Implement onResponseProposed
We want the actors to handle the event This handler should:
Follow figma sequence diagram: https://www.figma.com/board/BbciqJb5spg35ZglTsRRBb/Offchain?node-id=239-2711&t=y06FKcx0NVro4Jml-4
|
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.
💯
const { currentEpoch, currentEpochTimestamp } = | ||
await this.protocolProvider.getCurrentEpoch(); |
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 think there is no need to call this in here, probably handle the epoch from the EboProcessor
is better to avoid extra calls. EboActor should already know the epoch on creation time, wdyt ?
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.
also if we decide to call this here, lets save it on the attributes from the instance
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.
Delightful comment; yes, the EboActor
will always handle the same epoch so these values can be passed within the constructor 💯
const request = this.registry.getRequest(requestId); | ||
|
||
if (!request) { |
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.
const request = this.registry.getRequest(requestId); | |
if (!request) { | |
if (requestId.toLowerCase() !== this.requestId.toLowerCase() ) { |
}, | ||
}); | ||
|
||
vi.spyOn(registry, "getRequest").mockReturnValue(undefined); |
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 should be changed if we decide to simplify the requestId check on the previous comment
private readonly actorRequest: { | ||
id: string; | ||
epoch: bigint; | ||
epochTimestamp: bigint; | ||
}, |
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.
noiiiiceeeeeee
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 🚀
🤖 Linear
Closes GRT-82
Description
EboActor.onResponseProposed
handlerEboActor
to private methodsEboActor
test suite inside a foldereboActor/
with a single file per method, as the set up/mocking for each handler + scenario tends to be pretty loadedlogger
in some test files that were generating some stdout noise duringvitest
execution