Skip to content

feat(wasm-mps): make message pool safe for E2E-encrypted per-recipient delivery - #364

Merged
johnoliverdriscoll merged 1 commit into
masterfrom
HSM-548
Aug 22, 2026
Merged

feat(wasm-mps): make message pool safe for E2E-encrypted per-recipient delivery#364
johnoliverdriscoll merged 1 commit into
masterfrom
HSM-548

Conversation

@johnoliverdriscoll

Copy link
Copy Markdown
Contributor

Ticket: HSM-548

@johnoliverdriscoll
johnoliverdriscoll requested a review from a team as a code owner August 20, 2026 04:08
@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown

HSM-548

) -> Result<HashMap<u8, Vec<u8>>, MpsError> {
let mut msg_map: HashMap<u8, Vec<DrvMessage>> = Default::default();
for msg in msgs {
let idx = msg.receiver().ok_or(MpsError::ProtocolError)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this uses DrvMessage/ zcash/orchard/redpallas lib stuff, does this mean this function will only be used for that coin? Trying to understand here, is this going to be used for all MPS stuff or just for redpallas ops?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for redpallas/orchard/zcash

)
.map(|(v, _)| v)
.map_err(|_| MpsError::DeserializationError)?;
for msg in &pool {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unbounded, perhaps something like:

if incoming.len() + pool.len() > MAX {
return Err
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not needed due to serialization sizes, but added to be extra safe

@Logicwax Logicwax left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@johnoliverdriscoll
johnoliverdriscoll merged commit 4460c4f into master Aug 22, 2026
15 checks passed
@johnoliverdriscoll
johnoliverdriscoll deleted the HSM-548 branch August 22, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants