What
updateImpactScore fetches the account on every call via rpcServer.getAccount(). If the RPC is slow or the same tx is submitted twice concurrently, duplicate transactions could be confirmed.
Why
Concurrent submissions can cause sequence number conflicts or duplicate on-chain state changes.
Scope
- Maintain a local sequence number counter
- Increment after successful transaction submission
- Reject submissions if local counter is out of sync
- Add a staleness check for the fetched account sequence
Acceptance Criteria
Technical Context
src/lib/registry.ts:24 — rpcServer.getAccount(keypair.publicKey())
src/lib/stellar.ts:34 — sendTransaction
- Could use a simple in-memory counter or a mutex
What
updateImpactScorefetches the account on every call viarpcServer.getAccount(). If the RPC is slow or the same tx is submitted twice concurrently, duplicate transactions could be confirmed.Why
Concurrent submissions can cause sequence number conflicts or duplicate on-chain state changes.
Scope
Acceptance Criteria
Technical Context
src/lib/registry.ts:24—rpcServer.getAccount(keypair.publicKey())src/lib/stellar.ts:34—sendTransaction