Skip to content

fix: close payout double-pay gaps in Ergo, Alephium, Beam, Warthog, Xelis - #13

Merged
colneech-dev merged 1 commit into
mainfrom
fix/payout-batch-idempotency-remaining-5-chains
Nov 24, 2026
Merged

colneech-dev merged 1 commit into
mainfrom
fix/payout-batch-idempotency-remaining-5-chains

Conversation

@colneech-dev

Copy link
Copy Markdown
Owner

Summary

Completes the payout idempotency pass started in #11: these 5 remaining handlers sent funds and persisted payments with no durable record in between, so a crash or RPC timeout between broadcast and persistence could pay the same balance again on the next run.

  • Ergo: begins a batch before WalletPaymentTransactionGenerateAndSendAsync; an explicit API rejection marks it failed, any other exception leaves it pending for an operator to resolve.
  • Alephium: build/sign don't move funds, only PostTransactionsSubmitAsync does, so the batch begins right before that call per address-group.
  • Beam: same per-balance shape as Ethereum/Kaspa (fix: close payout double-pay gaps in 5 non-Bitcoin payout handlers #11) - begins/completes a batch around SendTransaction.
  • Warthog: batch begun per-transfer right before the SendTransaction REST POST; removed the now-redundant bulk PersistPaymentsAsync call since persistence already happens per-transfer.
  • Xelis: BuildTransaction signs and broadcasts in one call, so the batch is begun right before it, per destination-page.

Test plan

  • dotnet build (Release, SkipNativeLibBuild=true) — 0 errors, only pre-existing warnings
  • Not yet deployed or exercised against a live wallet for any of these 5 chains

🤖 Generated with Claude Code

…elis

Completes the payout idempotency pass (see fix/payout-batch-idempotency-5-chains):
these 5 remaining handlers sent funds and persisted payments with no durable
record in between, so a crash or timeout between broadcast and persistence
could pay the same balance again on the next run.

Ergo: begins a batch before WalletPaymentTransactionGenerateAndSendAsync;
a PaymentException (explicit API rejection) marks it failed, any other
exception (transport failure) leaves it pending for an operator to resolve.

Alephium: the build/sign steps don't move funds, only PostTransactionsSubmitAsync
does, so the batch is begun right before that call per address-group.

Beam: same per-balance shape as Ethereum/Kaspa - begins/completes a batch
around SendTransaction.

Warthog: the batch is begun per-transfer right before the SendTransaction
REST POST (the only step that moves funds); build/sign of the transaction
happens earlier and is unaffected. Removed the now-redundant
PersistPaymentsAsync(successBalances) since persistence already happened
per-transfer.

Xelis: BuildTransaction signs and broadcasts in one call, so the batch is
begun right before it, per destination-page.

Build-verified: dotnet build (Release, SkipNativeLibBuild=true), 0 errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@colneech-dev
colneech-dev merged commit 739338d into main Nov 24, 2026
1 check passed
@colneech-dev
colneech-dev deleted the fix/payout-batch-idempotency-remaining-5-chains branch November 24, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant