-
Notifications
You must be signed in to change notification settings - Fork 6
Description
In local testing, I'm currently batching multiple transfer_from calls from a canister to the cycles ledger.
In this simple case, I set up 16 cycle ledger developer "user" accounts, and then make calls in parallel to transfer the exact same amount of cycles from each user to an account owned by a canister (the receiver account is the same for all 16 calls).
Even though the "sender" of cycles in each case is different, I'm receiving duplication errors.
When I stringify the resulting errors (in Motoko) I see one successful transfer, and the rest recognized as duplicates.
[{"ok":"720"},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}},{"err":{"Duplicate":{"duplicate_of":"720"}}}]
Following these deduplication instructions and adding unique memo content for each request solves this problem (no deduplication errors), but it feels like if the sender and receiver are different, the payload is structurally different and this deduplication error shouldn't occur (it shouldn't require me adding a unique memo).