How should we shape the IPC schema for #24? #48
Replies: 3 comments 4 replies
-
|
First off, thanks for working on this! I'll take a look at the concrete sketch and give more detailed feedback.
I think we should always assume the most capable consumer, and mitigate the risk that they use the interface incorrectly with clear documentation and toy examples. I feel its the right call to lean heavily into the Capnproto design and documentation recommendations. Glad to see you came to the same conclusion! A few questions in my mind:
I'm curious to hear your thoughts @ismaelsadeeq on the fee stuff because you've thought about this a lot more than I have |
Beta Was this translation helpful? Give feedback.
-
The As it stands, the fee estimator is a passive observer of the validation interface notifications; those notifications could just be propagated via the Chain interface, I like the initial idea from @ViniciusCestarii with this, you can basically have multiple fee estimators and remove any one when there's a better one, as long as everything is properly abstracted. |
Beta Was this translation helpful? Give feedback.
-
Nice, in this case, the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Spinning this out of #24 (IPC interface for LND support) and josibake's comment.
How should a generic IPC interface look?
My sketch
A bootstrap
Inithands out one capability per domain:Chain— tip / blocks / headers / tx lookup / utxoMempool— testAccept / submitFee— estimate / relay infoNetwork— networks / local addressesNode— version / subversionStorage— size on disk / pruningschemas: https://github.com/ViniciusCestarii/bitcoin-capnp-schema/tree/master/schemas
My main concern: do we return objects like a block as capabilities (
blockByHash -> Block, thenblock.txs()/block.raw()lazily) or as flat structs + direct methods? Capability-first keepsChainsmall and letsBlockgrow new methods without widening the top-level interface, andchain.tip().txs()is one round trip with pipelining, but it assumes consumers know what they are doing (e.g. knows how to pipeline requests).In the schemas I made, I took the capability approach since it is cleaner and has a more capnp feel and less giant singleton interface, just like capnp docs recommend.
This is a brainstorm to react to, not a proposal I'm attached to. Feedback, and any alternative shapes are welcome!
Beta Was this translation helpful? Give feedback.
All reactions