Avatar
Jesse de Wit
3ddc1b50190c42b9ec5d5814a0adc32ed77f6303b729a1b66b704d237ec920d4
Lightning developer | Breez

Over time got some reports of strange errors in the breez sdk. Sometimes there were DNS errors, sometimes payments not working, sometimes requests not arriving at the greenlight servers at all.

Turns out it's app hibernation causing these issues. The rust code would still be running, but it wouldn't get any resources to execute. That causes grpc channels to fail functioning after coming back from hibernation.

Adding a 'sleeper loop' to the Breez SDK. It sleeps in a loop for one second. If the sleep takes a long time, it means the app hibernated. Then reconnect any grpc clients.

It's an interesting dynamic to guard against. Thr SDK should becone more robust for hibernation this way soon.

Yeah that's the way. But how to get each block in forward order?

I have an application that needs to get certain data from the chain, so it syncs blocks off the bitcoind rpc. Parses the blocks, checks if there's relevant data and moves to the next block. I want that application to start at genesis (or some birthday block) and sync the chain from there.

Right now I'm getting the headers first, backwards, from tip to birthday. Then sync the blocks forwards, from birthday to tip. I was wondering whether I could skip the headers part and sync directly from birthday to the tip, forwards.

Is there a way to sync the chain forwards from the bitcoind rpc? The only way I found now is to

- get the tip

- get previous headers one by one

- then start syncing blocks from the start with the headers you've found

What I'd like to do:

- get the genesis block

- get the 'next' block

- etc.

Is there way with the bitcoind rpc?

Replying to Avatar Constant

nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 heeft mij, naar Itialiaans voorbeeld, opgedragen in het Nederlands te posten. Dus, hierbij;

Waar zijn al mijn medelanders?

Het is patat.

Hier nog een. Ben benieuwd naar de theorie?

Yeah that's worth a PR I think.

Tip about CLN:

When CLN forwards a payment and it has multiple channels with the same peer, it selects the channel with the highest available balance out of channels with the same fee policy as the one the sender specified.

Say you have 3 channels with the same peer.

- A has fee 10ppm and is depleted

- B has fee 10ppm and has 100sat sendable balance

- C has fee 5ppm and has 1 BTC sendable balance

Sender computes a route that contains channel A, sends a payment.

Your node will pick the channel with the highest balance out of channel A and B, because they have the same fee rate. In this case it picks B because it has the highest balance.

If the payment was more than 100sat, the forward will fail.

Yes! Just not for future calendar events or anything like that.

Yeah. It's permanent. There's several names for this. Among others:

LND - lightning nervosity disorder

CLN - cerebral lightning nervosity

Yeah, I just installed.

It looks pretty slick, onboarding is easy.

I would like to be able to find people if I'm not connected to their relay. Either through npub, or through the email address notation.