apollo_propeller: add MessageProcessor scaffolding#12003
Conversation
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama resolved 1 discussion.
Reviewable status: 3 of 4 files reviewed, 9 unresolved discussions (waiting on guy-starkware, noamsp-starkware, and sirandreww-starkware).
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama resolved 1 discussion.
Reviewable status: 3 of 4 files reviewed, 8 unresolved discussions (waiting on guy-starkware, noamsp-starkware, and sirandreww-starkware).
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama resolved 1 discussion.
Reviewable status: 3 of 4 files reviewed, 7 unresolved discussions (waiting on guy-starkware, noamsp-starkware, and sirandreww-starkware).
db030c5 to
bc26e1d
Compare
8565700 to
a22c082
Compare
sirandreww-starkware
left a comment
There was a problem hiding this comment.
@sirandreww-starkware made 10 comments and resolved 1 discussion.
Reviewable status: 2 of 4 files reviewed, 6 unresolved discussions (waiting on guy-starkware, noamsp-starkware, and ShahakShama).
crates/apollo_propeller/src/message_processor.rs line 4 at r1 (raw file):
Previously, ShahakShama wrote…
To make it clear, Andrew please rephrase this at a way that's easier to understand
Removed
crates/apollo_propeller/src/message_processor.rs line 41 at r1 (raw file):
Previously, ShahakShama wrote…
+1. Also, publisher public key is message identification IIUC
Let's just remove these comments
Done
crates/apollo_propeller/src/message_processor.rs line 24 at r2 (raw file):
Previously, ShahakShama wrote…
Rename to EventStateManagerToEngine or CommandStateManagerToEngine to make its meaning more clear (and then you can remove the comment above)
If you chose event, rename the Event variant to BehaviourEvent or ExternalEvent
Done
crates/apollo_propeller/src/message_processor.rs line 47 at r2 (raw file):
Previously, ShahakShama wrote…
Make these bounded. TODO is fine for now
Added a comment why this needs to be unbounded
crates/apollo_propeller/src/message_processor.rs line 51 at r2 (raw file):
Previously, ShahakShama wrote…
Rename to describe what this does better
Agreed in meeting not to do this
crates/apollo_propeller/src/message_processor.rs line 56 at r2 (raw file):
Previously, ShahakShama wrote…
I think this can be debug
Done
crates/apollo_propeller/src/message_processor.rs line 56 at r2 (raw file):
Previously, ShahakShama wrote…
Add a use statement instead (should've probably wrote this in previous PRs)
Done
crates/apollo_propeller/src/message_processor.rs line 67 at r2 (raw file):
Previously, ShahakShama wrote…
Explain why you need this, both to me and in the TODO
will be removed in future PRs
crates/apollo_propeller/src/message_processor.rs line 70 at r3 (raw file):
Previously, ShahakShama wrote…
use tokio::timeout instead
I don't want to restructure the loop, timeout takes a future and runs it with a timeout.
there's also tokio::sleep, but I'm worried that if I give it a duration rather than an instance the duration will reset on the next iteration of the loop
crates/apollo_propeller/src/message_processor.rs line 70 at r3 (raw file):
Previously, ShahakShama wrote…
Add TODO to run the logic
Not necessary, next PR fixes this
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama reviewed 2 files and all commit messages, made 1 comment, and resolved 6 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on guy-starkware and noamsp-starkware).
guy-starkware
left a comment
There was a problem hiding this comment.
@guy-starkware reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on noamsp-starkware).
bc26e1d to
5805542
Compare
a22c082 to
4b0f6f9
Compare
5805542 to
f15b95a
Compare
3130129 to
476cbae
Compare
6a30d55 to
0862594
Compare
05a0515 to
3e54bba
Compare
0862594 to
5428236
Compare
sirandreww-starkware
left a comment
There was a problem hiding this comment.
@sirandreww-starkware reviewed 4 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on noamsp-starkware).
3e54bba to
aab26f0
Compare
5428236 to
6ee3b2a
Compare
6ee3b2a to
2dbf031
Compare

Note
Low Risk
Mostly scaffolding and wiring for a new async component; behavior change is limited to emitting timeout/finalization events once the processor is instantiated and run.
Overview
Adds a new
message_processormodule exposing aMessageProcessortask skeleton for per-message processing, including an engine-facingEventStateManagerToEnginechannel protocol.The processor currently implements timeout handling: after
timeoutit emitsEvent::MessageTimeoutand aFinalizedsignal over an unboundedtokio::mpscsender, then exits;tokiois added as a crate dependency to support this async runtime/timers.Written by Cursor Bugbot for commit 2dbf031. This will update automatically on new commits. Configure here.