Duplicate entry error when using cln + postgres + bolt11 #1162
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk#1162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm trying cdk-mintd @ main with my CLN v25.09 node and cdk-cli. I tried to
mintsome sats but i always get a duplicate entry error. First i thought it was because i paid the bolt11 with a self payment but it happens with an external wallet aswell.Using
--method bolt12works fine, the only thing weird was that the command didn't return but Ctrl+C and checking thebalanceshowed that it was there.Full log of mintd when the payment happens:
Hi @daywalker90 ! Thanks for such a detailed report. I appreciate the logs. Would you mind checking if #1166 is enough to fix this race condition?
Also you should still be able to mint the ecash with
cdk-cli mint <mint_url> --quote-id 44633f4e-8c1f-4ed0-877a-e4d479f33cf5. Even if you got an error from the first request.Yes that works but i didn't know where to get the quote-id besides from the logs.
Everything is fixed except the command not returning when using
--method bolt12(it does with bolt11 now)These are logs of cdk-cli when i use bolt12 where everything worked in the background atleast according to
balancebut the command won't return to the console and i have to ctrl+c:This is actually expected because bolt12 is repayable so it keeps the connection open to wait for more payments. We should add print logging to make this more clear.
We should print this as well I'll check.
oh btw i first thought the
mint-pendingcommand was for this but it only returnedError: Not enough elements: expected 11, got 10