I’m headed into the office now and I’ll sort it out first thing. Thanks for providing all the detail. It’s sometimes hard to know whether we’re communicating things poorly or there’s a bug. Rewards and revenue notifications are only made when the account balance increases for rewards/revenue and vice versa, but something could still be going on.
339 sats \ 16 replies \ @k00b 1 Nov
Found it. Thank you so much for uncovering this!
It's an issue when owning multiple territories - it's only increasing your account balance using the revenue of one of the territories that you own (worse, the one territory that increases your account balance is nondeterministic (ie random)).1
Here's what I'm going to do before the end of the day (in addition to fixing this bug):
  1. For anyone that's owned multiple territories, I'm going to repay them ALL the revenue from ALL their territories (including repaying them for the one territory they were already paid for, meaning they'll be double paid for one territory each day they owned multiple).
  2. I'm going to reward you with a big bug bounty
We'll also add to the roadmap improvements to the audibility of account balances so that issues like this can be spotted immediately.

Footnotes

  1. For nerds, this is caused by an UPDATE ... FROM statement that increments the same row and column more than once. Each additional UPDATE of the row overwrites the previous UPDATE to it, because the first UPDATE has not been committed when the second UPDATE runs (because they're in the same statement). eg WITH operand (addend, id) as (values (1, 1000), (1, 1000), (1, 1000)) UPDATE my_table set my_sum = my_table.my_sum + operand.addend FROM operand WHERE my_table.id = operand.id will only add 1 to my_table.my_sum -- not the expected 3.
reply
Is this bug reproducible only for stackers that run multiple territories?
reply
21 sats \ 3 replies \ @k00b 1 Nov
This only applies to stackers that run multiple territories. For stacker that only run one territory, this bug does not apply.
reply
Ok - relieved 😌
Anyway, I'll follow this thread for updates on this issue
reply
0 sats \ 1 reply \ @k00b 1 Nov
If you believe there is a bug that you've experienced otherwise though, as always, lmk.
reply
201 sats \ 0 replies \ @ch0k1 1 Nov
Always! You can count on me on that 😜
reply
Wow. Above and beyond what I was expecting to wake up to this morning.
Thanks a bunch, k00b and team. Look forward to helping grow SN and making every territory wildly profitable as we completely obsolete Reddit.
Will those payments just come through at midnight tonight?
reply
21 sats \ 7 replies \ @k00b 1 Nov
I'll push an update that will update your balance sometime this afternoon.
If you can reply with a 1 million sat invoice, I'll send you your bug bounty out of band.
reply
Looking forward to the update.
😳 That's a very generous bounty. Thanks a million.
lightning:lnbc10m1pnj2qkepp5dxqxgazm230ltduzungg0mkq05fytf0a4nz9dr75s7v0dts2hpkqcqpjsp5sfptvqzw0zy5nx8fps0f9kwwkhlzhjuyt8wle3f8fu4hqapqhkps9q7sqqqqqqqqqqqqqqqqqqqsqqqqqysgqdqsgf6kwgrzda6kuaremqz9gxqyjw5qrzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glcll6205l5hdfg5vqqqqlgqqqqqeqqjqr3e7v3qldrylr3djk5j7nnpnyu5tkug9qc23zfscvejtkwydvr5hjttfs7y6e778e7446ka6nw7aypwuurzya8yw8avafx5ee5ykulgpyqd6p6
reply
0 sats \ 5 replies \ @k00b 1 Nov
Do you have enough liquidity for a payment that large? I've tried twice and it's failed. It might be an intermittent issue though. I'll try again in a few minutes.
@remindme in 10 minutes
reply
My bad. Low liquidity and I'm receiving with Phoenix.
I just updated my channel settings.
reply
0 sats \ 3 replies \ @k00b 1 Nov
It failed again. I'm surprised phoenix isn't creating a channel with the payment.
@remindme in 10 minutes.
reply
Yeah, I set my channel creation fee amount pretty high. It should absolutely make a channel with the payment.
21 sats \ 1 reply \ @ek 1 Nov
That’s one way to make territories profitable 👀
reply
The future is bright for SN and all of its territories.
There's nothing else in the world like it.
reply