-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make lightning gateway optional #200
Conversation
- mint-clint-cli gets command to generate invoices - Gateway plugin automatically generates gateway.json if it isn't there. Removed gw_configgen bin script. - Add route hint to invoices we generate - Gateway uses channels to concurrency between webserver, plugin and background fetching - Had to add more features to tracing dependency for the gateway crate because Core Lightning communicates to plugins via stdin/ stdout. Logging is routed via JSON-RPC. These feature flags helped make that work. -
- Lightning gateway no longer generates `client.json`. `configgen` does that now. - `run_webserver` reads gateway port from config, doesn't hard-code - Gateway API endpoint to fetch node pubkey and ecash pubkey
@@ -46,5 +46,5 @@ impl<CO> OwnedClientContext<CO> { | |||
#[derive(Debug, Serialize, Deserialize)] | |||
pub struct ClientAndGatewayConfig { | |||
pub client: ClientConfig, | |||
pub gateway: LightningGateway, | |||
pub gateway: Option<LightningGateway>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a Vec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Just noticed the dependency on the GW plugin, hope to merge soon.
# Send bitcoin to gateway lightning address | ||
bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin sendtoaddress <LN_ADDRESS> <AMOUNT> | ||
# Send bitcoin to gateway lightning address, and mine a block to confirm it | ||
bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin sendtoaddress <LN_ADDRESS> 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have large enough denominations for this to not take days (e.g. if the server had to issue 100'000 tokens)
Closing in favor of #269 |
Builds on #174. Just look at 2nd commit.
Our README on master right now claims that the gateway is optional, but our code doesn't. Instead, we just generate a random node pubkey! But this isn't a problem because it would only be used in an invoice and we haven't done that, yet.
So this PR attempt to make the gateway optional. It also stops having the gateway code generate
client.json
and instead adds a new command toconfiggen
to do this. Along the way I added a/info
endpoint to the gateway HTTP server so you can look up gateway public keys.