etherspot / etherspot/relayx

Edge case: duplicate taskId entries in one relayer_sendTransactionMultichain batch

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
bug rust
Dominant language
Rust
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Summary

`process_send_transaction_multichain` validates each provided `taskId` against storage but does not detect **duplicate task IDs within the same request array** before processing (`src/methods/send_tx/multi.rs`).

## Behavior

The first item succeeds and persists the id; a later item with the same `taskId` fails with duplicate (`4214`) after partial relay, leaving the batch in a partially applied state.

## Suggested fix

Pre-scan the `items` slice for duplicate `taskId` values (when `Some`) and reject the entire request with `-32602` or `4214` before mutating state.

## References

- `src/methods/send_tx/multi.rs`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.