core-lightning/doc
Vincenzo Palazzo 85992e6e48 feat(bitcoind): pass the current known block height
When core lightning is asking the information about
the blockchain with `getchaininfo` command lightningd
know already the information about the min and max block height.

the problem is when we have a smarter Bitcoin backend that is able
to switch between different clients in some cases is helpful
give the information about current known height by lightningd and
pass it down to the plugin.

In this way, the plugin knows what is the correct known height from lightnind, and can
try to fix some problems if any exit.

This is particularly useful when you are syncing a new backend from scratch
like https://github.com/cloudhead/nakamoto and we avoid returning the
lower height from the known, and avoid the crash of core lightning.

With this information, the plugin can start to sync the chain and return
the answer back only when the chain is in sync with the current status of
lightningd.

Another reason to add this field and not wait the correct block in core
lightning itself is because Bitcoin Core is extremely slow to sync up,
so the question here is, how long should we wait? The time depends
on various factors.

With this approach of informing the plugin about the height, in some cases,
you can start the syncing but move the execution to another backend until
the previous one is ready.

The problem I want to solve is that I don't want to be left in the dark when
we run `getchaininfo`, and I want to have the opportunity to wait for
the blockchain sync or decide to dispatch the request elsewhere.

Changelog-Added: Pass the current known block height down to the getchaininfo call.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-06-13 16:27:10 +02:00
..
dev docs: Add docs on code generation 2023-03-25 15:40:35 +10:30
guides doc: Add guides and GitHub workflow for doc sync 2023-06-06 12:40:19 +09:30
reference docs: Structure the files in mkdocs 2023-03-25 15:40:35 +10:30
release-notes doc: Fixed typo in the release notes 2018-06-18 12:45:00 +02:00
schemas listconfigs: add plugin field if config is for a plugin. 2023-06-03 10:50:29 +09:30
user docs: Structure the files in mkdocs 2023-03-25 15:40:35 +10:30
.gitignore doc: document the sql command. 2023-01-30 15:15:41 -06:00
BACKUP.md docs: Use admonition markup for warnings and notes 2023-03-25 15:40:35 +10:30
bitcoin.bib bitcoin.bib: Add Satoshi paper URL and date 2018-03-04 03:22:32 +01:00
CHANGELOG.md docs: Add configuration for the sphinx documentation generator 2019-02-18 02:42:29 +00:00
commit-tx.eps
commit-tx.svg
conf.py doc: sphinx-build fix external links (urls), language warning and broken footnote 2022-12-19 19:00:39 +01:00
deployable-lightning.lyx udpate broken link 2018-06-08 17:56:48 +02:00
deployable-lightning.pdf Regenerate PDF. 2015-11-20 06:45:19 +10:30
dual-anchor-diag1.eps
dual-anchor-diag1.svg
dual-anchor-diag2.eps
dual-anchor-diag2.svg
dual-anchor-diag3.eps
dual-anchor-diag3.svg
dual-anchor-diag4.eps
dual-anchor-diag4.svg
dual-anchor-final.eps
dual-anchor-final.svg
dual-anchor-take2.svg
dual-anchor.svg
FAQ.md docs: Remove redundant ToC in FAQs 2023-03-25 15:40:35 +10:30
FUZZING.md build: remove --enable-experimental-features / EXPERIMENTAL_FEATURES 2023-05-23 09:34:08 +09:30
GOSSIP_STORE.md doc/GOSSIP_STORE.md: document the gossip_store file format. 2022-09-24 15:22:27 +09:30
HACKING.md doc: update references to old BOLTs repo. 2022-09-29 16:10:57 +09:30
htlc.eps
htlc.svg
index.md docs: Structure the files in mkdocs 2023-03-25 15:40:35 +10:30
index.rst doc: commando-listrunes & commando-blacklist 2023-04-01 14:07:23 +10:30
INSTALL.md build: remove gmp 2023-05-24 18:21:43 +09:30
LICENSE.md docs: Add LICENSE to the About section 2023-03-25 15:40:35 +10:30
lightning-addgossip.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-autoclean-once.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-autoclean-status.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-batching.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-channelsapy.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-dumpincomecsv.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-inspect.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-listaccountevents.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-listbalances.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-bkpr-listincome.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-check.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-checkmessage.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-cli.1.md cli: add -c/--commando support. 2023-01-11 11:13:27 +10:30
lightning-close.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-commando-blacklist.7.md doc: commando-listrunes & commando-blacklist 2023-04-01 14:07:23 +10:30
lightning-commando-listrunes.7.md doc: fix commando-listrunes SHA256SUM line. 2023-04-05 09:41:04 +02:00
lightning-commando-rune.7.md doc: document that we strip punctuation from parameter names. 2023-06-06 19:47:08 +09:30
lightning-commando.7.md doc: escape more naughty underscores 2022-12-12 15:34:00 +10:30
lightning-connect.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-createinvoice.7.md doc: Correct createinvoice's invstring description 2023-02-06 15:54:32 -06:00
lightning-createonion.7.md doc/schemas: remove unnecessary length restrictions. 2023-01-30 15:15:41 -06:00
lightning-datastore.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-decode.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-decodepay.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-deldatastore.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-delexpiredinvoice.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-delforward.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-delinvoice.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-delpay.7.md delpay: delete the payment by status from the db 2023-04-05 06:15:47 +09:30
lightning-disableinvoicerequest.7.md doc: add documentation for invoicerequest commands. 2023-03-09 06:56:06 -06:00
lightning-disableoffer.7.md doc: use specific types in schema rather than "hex". 2023-01-30 15:15:41 -06:00
lightning-disconnect.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-emergencyrecover.7.md doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
lightning-feerates.7.md doc: document that urgent doesn't use the 2-block estimate, but the 6-block. 2023-04-11 12:01:27 -07:00
lightning-fetchinvoice.7.md doc: update documentation for fetchinvoice(7) and offer(7). 2023-03-09 06:56:06 -06:00
lightning-fundchannel_cancel.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-fundchannel_complete.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-fundchannel_start.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-fundchannel.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-funderupdate.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-fundpsbt.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-getinfo.7.md common: add new internal type for websockets. 2023-06-01 09:28:39 +09:30
lightning-getlog.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-getroute.7.md global: remove deprecated non-msat-named msat fields. 2023-03-18 15:55:49 +10:30
lightning-help.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-hsmtool.8.md hsmtool: makerune command. 2023-04-11 11:19:13 -07:00
lightning-invoice.7.md doc/schemas: remove unnecessary length restrictions. 2023-01-30 15:15:41 -06:00
lightning-invoicerequest.7.md doc: add documentation for invoicerequest commands. 2023-03-09 06:56:06 -06:00
lightning-keysend.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-listchannels.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-listclosedchannels.7.md lightningd: add listclosedchannels command. 2023-03-25 15:28:02 +10:30
lightning-listconfigs.7.md listconfigs: add plugin field if config is for a plugin. 2023-06-03 10:50:29 +09:30
lightning-listdatastore.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-listforwards.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-listfunds.7.md docs: update autogenerate file 2023-03-26 13:42:29 +10:30
lightning-listhtlcs.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-listinvoicerequests.7.md doc: add documentation for invoicerequest commands. 2023-03-09 06:56:06 -06:00
lightning-listinvoices.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-listnodes.7.md common: add new internal type for websockets. 2023-06-01 09:28:39 +09:30
lightning-listoffers.7.md doc: use specific types in schema rather than "hex". 2023-01-30 15:15:41 -06:00
lightning-listpays.7.md doc: use specific types in schema rather than "hex". 2023-01-30 15:15:41 -06:00
lightning-listpeerchannels.7.md jsonrpc: Add versioning annotation to listpeerchannels 2023-05-05 11:54:41 +09:30
lightning-listpeers.7.md common/channel_type: routines to set known variants, set scid_alias. 2023-04-10 17:26:47 +09:30
lightning-listsendpays.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-listsqlschemas.7.md typo fixes found by @niftynei 2023-01-30 15:15:41 -06:00
lightning-listtransactions.7.md listtransactions: remove annotations, which were only in EXPERIMENTAL_FEATURES. 2023-05-23 09:34:08 +09:30
lightning-makesecret.7.md doc/schemas: remove unnecessary length restrictions. 2023-01-30 15:15:41 -06:00
lightning-multifundchannel.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-multiwithdraw.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-newaddr.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-notifications.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-offer.7.md doc: update documentation for fetchinvoice(7) and offer(7). 2023-03-09 06:56:06 -06:00
lightning-openchannel_abort.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-openchannel_bump.7.md df: wire up peer's "require-confirmed-inputs" 2023-02-07 21:03:36 -06:00
lightning-openchannel_init.7.md df: wire up peer's "require-confirmed-inputs" 2023-02-07 21:03:36 -06:00
lightning-openchannel_signed.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-openchannel_update.7.md df: wire up peer's "require-confirmed-inputs" 2023-02-07 21:03:36 -06:00
lightning-parsefeerate.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-pay.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-ping.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-plugin.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-preapproveinvoice.7.md msggen: Add preapproveinvoice and preapprovekeysend to msggen 2023-05-29 14:50:13 +09:30
lightning-preapprovekeysend.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-recoverchannel.7.md doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
lightning-reserveinputs.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-sendcustommsg.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-sendinvoice.7.md doc: fix modern usage of sendinvoice (changed in v22.11) 2023-03-09 06:56:06 -06:00
lightning-sendonion.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-sendonionmessage.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-sendpay.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-sendpsbt.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-setchannel.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-setpsbtversion.7.md Add PSBT version setting RPC to aid with debugging and compatibility 2023-03-23 16:10:55 +10:30
lightning-signinvoice.7.md lightningd: Add signinvoice to sign a BOLT11 invoice. 2023-02-06 15:54:32 -06:00
lightning-signmessage.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-signpsbt.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-sql.7.md listtransactions: remove annotations, which were only in EXPERIMENTAL_FEATURES. 2023-05-23 09:34:08 +09:30
lightning-staticbackup.7.md doc: Typo 2022-08-19 10:27:09 -04:00
lightning-stop.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-txdiscard.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-txprepare.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-txsend.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-unreserveinputs.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-upgradewallet.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightning-utxopsbt.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-waitanyinvoice.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-waitblockheight.7.md tools/fromschema.py: don't try to handle more complex cases. 2023-01-30 15:15:41 -06:00
lightning-waitinvoice.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-waitsendpay.7.md doc/schemas: fix old deprecations. 2023-01-30 15:15:41 -06:00
lightning-withdraw.7.md lightningd: allow "NNblocks" and "minimum" as feerates. 2023-04-10 07:31:12 +09:30
lightningd-config.5.md lightningd: allow --regtest. 2023-06-03 10:50:29 +09:30
lightningd-rpc.7.md doc: escape more naughty underscores 2022-12-12 15:34:00 +10:30
lightningd.8.md doc: escape more naughty underscores 2022-12-12 15:34:00 +10:30
ln-draft-fig1.eps
ln-draft-fig2.eps
Makefile doc/Makefile: restore CI check for schema changes. 2023-06-05 09:25:57 +09:30
MAKING-RELEASES.md doc: making release document update 2023-06-05 14:54:32 +02:00
PLUGINS.md feat(bitcoind): pass the current known block height 2023-06-13 16:27:10 +02:00
reckless.7.md doc: escape more naughty underscores 2022-12-12 15:34:00 +10:30
REPRODUCIBLE.md doc: update release procedure 2023-03-17 14:26:56 +10:30
requirements.txt docs: Switch to mkdocs for documentation 2023-03-25 15:40:35 +10:30
STYLE.md build: remove --enable-experimental-features / EXPERIMENTAL_FEATURES 2023-05-23 09:34:08 +09:30
TOR.md doc: announce-addr-discovered config switch 2023-01-25 14:37:56 +01:00
undoc-flags.json lightningd: allow extra tlv types in non-experimental mode. 2022-09-22 17:19:11 +09:30