Skip to content

Instantly share code, notes, and snippets.

@willcl-ark
willcl-ark / will-clark-LPE.md
Created October 14, 2021 13:33
will-clark-LPE response

Will Clark - Protocol Engineer Take Home Question

Consider the following protocol spec:

Request format:

PACKET := HEADER | BODY

HEADER := LENGTH | TYPE
@willcl-ark
willcl-ark / git_aliases_PRs.txt
Created April 23, 2020 08:52
git aliases to checkout and remove PRs easily
# Add this section to your global ~/.gitconfig file
[alias]
pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
spr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull-requests/$1/from:pr/$1 && git checkout pr/$1; }; f"
"""lightning mesh proxy.
Usage:
proxy.py MY_PUBKEY REMOTE_PUBKEY REMOTE_GID
Arguments:
MY_PUBKEY my node pubkey
REMOTE_PUBKEY the pubkey of the remote node
REMOTE_GID the GID of the remote node
"""

Keybase proof

I hereby claim:

  • I am willcl-ark on github.
  • I am willcl_ark (https://keybase.io/willcl_ark) on keybase.
  • I have a public key ASDI5n7rvhxIhPw85s8Dk3rqN4_8kz7dzW6J7fZKknHnRQo

To claim this, I am signing this object:

>>> all_backup = bob.export_all_channel_backups()
>>> type(all_backup.single_chan_backups)
<class 'lnd_grpc.protos.rpc_pb2.ChannelBackups'>
>>> bob.verify_chan_backup(single_chan_backups=all_backup.single_chan_backups)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/satoshi/Documents/src/lnd_grpc/lnd_grpc/lightning.py", line 484, in verify_chan_backup
response = self.lightning_stub.VerifyChanBackup(request)
File "/Users/satoshi/Documents/src/lnd_grpc/.venv/lib/python3.7/site-packages/grpc/_channel.py", line 549, in __call__
return _end_unary_response_blocking(state, call, False, None)
import codecs
import json
import os
import sys
import pprint
import grpc
from google.protobuf.json_format import MessageToJson
from tabulate import tabulate