Skip to content

Credit child wallets when funding without a batcher - #274

Draft
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix/without-batcher-credit-gap
Draft

Credit child wallets when funding without a batcher#274
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix/without-batcher-credit-gap

Conversation

@damilolaedwards

Copy link
Copy Markdown
Contributor

Summary

  • When funding runs without a batcher, the transfer to each child wallet was sent but never recorded against that wallet's funding request, so the wallet's expected balance never got credited even though the transfer succeeded on chain.
  • Added the missing entry so the non-batcher path credits child wallets the same way the batcher path already does.

Test plan

  • Added a test confirming child wallets are credited after a successful non-batcher funding transfer.
  • Added a test confirming failed transfers are not credited.

The credit loop that adds confirmed funding amounts to each recipient's
tracked balance keys off a map from transaction hash to the funding
requests it covers, but that map was only ever built on the batcher path.
Running with --without-batcher built one transaction per request just fine,
but never recorded it in that map, so the credit loop found nothing for any
of them. The on-chain transfer succeeded every time; spamoor's own ledger
just never learned about it, so tracked balances stayed stale for the rest
of the run.

Each individual funding transaction is now recorded as a batch of one, so
the same credit loop that already works for the batcher path covers this
mode too.
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