-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Open
Copy link
Milestone
Description
Current deserealization of InputNoteCommitment from its proto counterpart involves a middle step of converting the inner fields to bytes, then build from_bytes:
node/crates/proto/src/domain/transaction.rs
Lines 88 to 96 in a287a5a
| // TODO: https://github.com/0xMiden/node/issues/1783 | |
| // InputNoteCommitment has private fields, so we reconstruct it via | |
| // serialization roundtrip using its Serializable/Deserializable impls. | |
| let mut bytes = Vec::new(); | |
| nullifier.write_into(&mut bytes); | |
| header.write_into(&mut bytes); | |
| InputNoteCommitment::read_from_bytes(&bytes) | |
| .map_err(|err| ConversionError::deserialization_error("InputNoteCommitment", err)) | |
| } |
After 0xMiden/protocol#2588 we should be able to remove the serialization middle step, and replace the instantiation of the type with from_parts_unchecked().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels