Skip to content

Commit 4411fc0

Browse files
committed
pr feedback: update doc comment
1 parent 8de4290 commit 4411fc0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ed25519-program/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ pub struct Ed25519SignatureOffsets {
3232

3333
/// Encode just the signature offsets in a single ed25519 instruction.
3434
///
35-
/// This is a convenience function for cases when verification data is to be read from a different instruction
36-
/// or acount. The caller can optionally choose to extend the instruction buffer with the verification data to
37-
/// form a properly verifiable instruction.
35+
/// This is a convenience function for rare cases where we wish to verify multiple messages in
36+
/// the same instruction. The verification data can be stored in a separate instruction specified
37+
/// by the `*_instruction_index` fields of `offsets`, or in this instruction by extending the data
38+
/// buffer.
39+
///
40+
/// Note: If the signer for these messages are the same, it is cheaper to concatenate the messages
41+
/// and have the signer sign the single buffer and use [`new_ed25519_instruction`].
3842
pub fn offsets_to_ed25519_instruction(offsets: &[Ed25519SignatureOffsets]) -> Instruction {
3943
let mut instruction_data = Vec::with_capacity(
4044
SIGNATURE_OFFSETS_START

0 commit comments

Comments
 (0)