Skip to main content
Round 2

Preparing for Conference Season

Status updates for Round 2 Week 1.

Good news for our team! We made it to Round 2 of the Top Builder hackathon! We are grateful to the judges for taking the time to consider LNPlay Round 1 activities and for advancing us to Round 2.

We are excited to meet our next set of milestones, most of which are event-based rather than goal-based as in Round 1. These include conference events at Bitcoin++ Buenos Aires and Bitcoin Atlantis in Madiera, Portugal, as well as two Bitcoin Meetups.

For this week, we worked on the following items to prepare for meeting our major goals and milestones before the upcoming conference events.

lnwidget.guide

We're working hard to wrap up loose ends on lnwidget.guide.

CLI-Rest Interface

After we made a few minor tweaks we were able to get the lightning-cli-rest interface running without issue. This involved fixing some bugs and making sure the curl statement works consistently--especially with parameterized queries.

Perfecting cln-reckless-wrapper

While developing the cln-reckless-wrapper plugin we ran into some rate-limiting issues which handicapped us in terms of plugin development. Especially considering LNPlay hosts potentially hundreds of independent CLN nodes, the risk of rate-limiting is high.

After some back and forth, we decided to reach out to the always-helpful Alex Myers who is "mostly responsible for the reckless code". After discussing the issues we were having, he quickly implemented a few mitigations that should help the reckless plugin avoid triggering rate limits (though this remains a risk). With these updates, reckless should make fewer API calls to Git Hub and as well as take advantage of pre-cloned data that we bake into the CLN image. All this is to avoid rate limits from Github.

💡
We want to thank Alex Myers for helping team LNPlay by improving the reckless plugin. These updates should result in a pull request from Alex.

cln-htmx-getinfo

The next step on lnwidget getting the cln-htmx-getinfo plugin to work consistently and reliably. After some back-and-forth updating both the plugin, reckless, and reckless-wrapper, we were able to get the cln-htmx-getinfo plugin installed and updated reliably. We hope this can serve as a basic demo / boilerplate to assist hackathoners with CLN plugin development.

One of our side projects for the last couple of weeks was getting a new logo for LNWidget.guide.

Although the website stands on its own, LNWidget pairs well with LNPlay. Thus the same color scheme and related font. We went back and forth a couple of times on the logo, but we eventually settled for the interlocking cogwheels. We'll be updating the website soon with the new logo.

htmx-getinfo widget

We finally reached the endpoint of our journey! Our goal was to create a VERY SIMPLE widget that uses HTMX. The final post on lnwidget.guide demonstrates the use of HTMX to create a widget returning some information from getinfo using the cln-htmx-getinfo plugin we created previously.

But there's more...

We finally reached this last part of the puzzle and got it working. But not quite...

The plugin we created uses the pyln client. Plugins that use this client return data as a JSON RPC; the Content-Type in the response headers is set to application/json. But HTMX requires that the Content-Type to be text/html.

💡
At this time, we have not determined a way to correctly set the response header on the server side.

After discussing this issue with Damian Goodenough, we concluded there were two possible paths to remediate this issue.

  1. Follow up with the pyln client project to see if we can set response headers on plugins.
  2. Propose updates to the cln-rest.py script to support namespaces in the API and setting response MIME types.

In the meantime, there are a couple of workarounds we are trying. The preferred mitigation is server-side by forcing nginx to replace the Content-Type response header IFF the request contains htmx. The other option is adding Javascript to the client to correctly interpret the data.

Prism updates

In other news, Damian Goodenough and farscapian continue to talk through the design of the prism-v2 plugin and commits continue to pile on top of the prism-v2 branch.

Performing V&V

We had hoped to perform an Independent Verification and Validation(IV&V) for LNPlay with D++ in preparation for Bitcoin Atlantis, but we were unable to meet to execute the test plan. So, Justin and farscapian executed the test plan again. Justin was Alice and Carol, and farscapian assumed the role of Bob in the test plan.

qr_to_pdf.sh

One difficulty we've had is printing instructional cards (~250 cards) with a unique QR code. ./show_cln_uri.sh is the script responsible for generating the Clams Remote Connect QR Codes. If you add the --qrcode flag, a bunch .png files are created. Our first attempt at instructional cards involved image manipulation software like Photoshop, batching, etc, to create a large PDF of instructional cards each with a unique QR code. It was very complicated and manual.

To simplify creation of the instructional cards, farscapian developed a script that produces a PDF with pages of size 4"x6", each containing a grid of 2x3 QR codes. Farscapian will be traveling with this Label Maker for the LNPlay workshop and Bitcoin Atlantis Lightning LARP.

🙏
Pray the label maker makes it through TSA! We'll submit an order at Staples in case of label maker theft.

The new script consumes the directory of PNG files (created by ./show_cln_uri.sh) and produces a PDF file in the exact format and DPI needed by the label maker. Check out the video:

Presentation for Bitcoin++

Farscapian also spent a few hours starting on an LNPlay Slides for his upcoming workshop at Bitcoin++.


Appreciate this detailed status report?