Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
libicu-dev \
libpq-dev \
libprotobuf-c-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libxml2-utils \
locales \
lowdown \
net-tools \
postgresql \
python-pkg-resources \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
bash \
gettext \
sqlite3 \
libsodium \
lowdown \
pkgconf \
jq \
Expand All @@ -60,7 +61,7 @@ jobs:
git clone https://github.com/lightning/bolts.git ../bolts
# fatal: unsafe repository ('/Users/runner/work/lightning/lightning' is owned by someone else)
git config --global --add safe.directory `pwd`
for d in libsodium libwally-core gheap jsmn libbacktrace lowdown; do git config --global --add safe.directory `pwd`/external/$d; done
for d in libwally-core gheap jsmn libbacktrace; do git config --global --add safe.directory `pwd`/external/$d; done
git submodule update --init --recursive

./configure CC="$CC" --disable-valgrind
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ jobs:
run: |
bash -x .github/scripts/setup.sh
sudo apt-get update -qq
sudo apt-get install -y -qq lowdown
# We're going to check BOLT quotes, so get the latest version
git clone https://github.com/lightning/bolts.git ../${BOLTDIR}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
export PATH="/usr/local/opt:/Users/runner/.local/bin:/opt/homebrew/bin/python3.10/bin:$PATH"

brew install gnu-sed autoconf automake libtool protobuf openssl
brew install gnu-sed autoconf automake libtool protobuf openssl lowdown libsodium

# https://github.com/grpc/grpc/issues/31737#issuecomment-1323796842
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
Expand Down
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "daemon/jsmn"]
path = external/jsmn
url = https://github.com/zserge/jsmn
[submodule "libsodium"]
path = external/libsodium
url = https://github.com/jedisct1/libsodium.git
[submodule "external/libbacktrace"]
path = external/libbacktrace
url = https://github.com/ianlancetaylor/libbacktrace.git
Expand All @@ -14,7 +11,3 @@
[submodule "external/gheap"]
path = external/gheap
url = https://github.com/valyala/gheap
[submodule "external/lowdown"]
path = external/lowdown
url = https://github.com/kristapsdz/lowdown.git
ignore = dirty
12 changes: 4 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 1 addition & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,6 @@ RUN gpg --quiet --import gpg/* && \

RUN tar xzf ${BITCOIN_TARBALL} --strip-components=1

ARG LITECOIN_VERSION=0.16.3
ARG LITECOIN_BASE_URL=https://download.litecoin.org/litecoin-${LITECOIN_VERSION}
ARG LITECOIN_URL=${LITECOIN_BASE_URL}/linux
ARG LITECOIN_TARBALL=litecoin-${LITECOIN_VERSION}-${target_arch}.tar.gz

WORKDIR /opt/litecoin

ADD ${LITECOIN_URL}/${LITECOIN_TARBALL} .
ADD ${LITECOIN_URL}/${LITECOIN_TARBALL}.asc .
ADD ${LITECOIN_BASE_URL}/SHA256SUMS.asc .
COPY contrib/keys/litecoin/ gpg/

RUN gpg --quiet --import gpg/* && \
gpg --verify SHA256SUMS.asc && \
gpg --verify ${LITECOIN_TARBALL}.asc ${LITECOIN_TARBALL} && \
sha256sum -c SHA256SUMS.asc --ignore-missing

RUN tar xzf ${LITECOIN_TARBALL} --strip-components=1

FROM base-host AS base-builder

RUN apt-get update && \
Expand Down Expand Up @@ -185,7 +166,6 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

COPY --from=downloader /opt/bitcoin/bin/bitcoin-cli /usr/bin/
COPY --from=downloader /opt/litecoin/bin/litecoin-cli /usr/bin/
COPY --from=builder /tmp/lightning_install/ /usr/local/

COPY tools/docker-entrypoint.sh /entrypoint.sh
Expand All @@ -197,4 +177,4 @@ ENV LIGHTNINGD_NETWORK=bitcoin

EXPOSE 9735 9835
VOLUME ["/root/.lightning"]
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
52 changes: 0 additions & 52 deletions bitcoin/chainparams.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,58 +162,6 @@ const struct chainparams networks[] = {
.bip32_key_version = {.bip32_pubkey_version = BIP32_VER_TEST_PUBLIC,
.bip32_privkey_version = BIP32_VER_TEST_PRIVATE},
.is_elements = false},
{.network_name = "litecoin",
.onchain_hrp = "ltc",
.lightning_hrp = "ltc",
.bip70_name = "main",
.genesis_blockhash = {{{.u.u8 = {0xe2, 0xbf, 0x04, 0x7e, 0x7e, 0x5a, 0x19,
0x1a, 0xa4, 0xef, 0x34, 0xd3, 0x14, 0x97,
0x9d, 0xc9, 0x98, 0x6e, 0x0f, 0x19, 0x25,
0x1e, 0xda, 0xba, 0x59, 0x40, 0xfd, 0x1f,
0xe3, 0x65, 0xa7, 0x12}}}},
.rpc_port = 9332,
.ln_port = 9735,
.cli = "litecoin-cli",
.cli_args = NULL,
.cli_min_supported_version = 150000,
.dust_limit = { 100000 },
.max_funding = AMOUNT_SAT_INIT(60 * ((1 << 24) - 1)),
.max_payment = AMOUNT_MSAT_INIT(60 * 0xFFFFFFFFULL),
.max_supply = AMOUNT_SAT_INIT(2100000000000000),
.when_lightning_became_cool = 1320000,
.p2pkh_version = 48,
.p2sh_version = 50,
.testnet = false,
.fee_asset_tag = NULL,
.bip32_key_version = {.bip32_pubkey_version = BIP32_VER_MAIN_PUBLIC,
.bip32_privkey_version = BIP32_VER_MAIN_PRIVATE},
.is_elements = false},
{.network_name = "litecoin-testnet",
.onchain_hrp = "tltc",
.lightning_hrp = "tltc",
.bip70_name = "test",
.genesis_blockhash = {{{.u.u8 = {0xa0, 0x29, 0x3e, 0x4e, 0xeb, 0x3d, 0xa6,
0xe6, 0xf5, 0x6f, 0x81, 0xed, 0x59, 0x5f,
0x57, 0x88, 0x0d, 0x1a, 0x21, 0x56, 0x9e,
0x13, 0xee, 0xfd, 0xd9, 0x51, 0x28, 0x4b,
0x5a, 0x62, 0x66, 0x49}}}},
.rpc_port = 19332,
.ln_port = 9735,
.cli = "litecoin-cli",
.cli_args = "-testnet",
.cli_min_supported_version = 150000,
.dust_limit = { 100000 },
.max_funding = AMOUNT_SAT_INIT(60 * ((1 << 24) - 1)),
.max_payment = AMOUNT_MSAT_INIT(60 * 0xFFFFFFFFULL),
.max_supply = AMOUNT_SAT_INIT(2100000000000000),
.when_lightning_became_cool = 1,
.p2pkh_version = 111,
.p2sh_version = 58,
.testnet = true,
.fee_asset_tag = NULL,
.bip32_key_version = {.bip32_pubkey_version = BIP32_VER_TEST_PUBLIC,
.bip32_privkey_version = BIP32_VER_TEST_PRIVATE},
.is_elements = false},
{.network_name = "liquid-regtest",
.onchain_hrp = "ert",
.lightning_hrp = "ert",
Expand Down
2 changes: 1 addition & 1 deletion common/configdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ struct configvar **initial_config_opts(const tal_t *ctx,
opt_register_early_arg("--network", opt_set_network, opt_show_network,
NULL,
"Select the network parameters (bitcoin, testnet,"
" signet, regtest, litecoin or litecoin-testnet)");
" signet, or regtest)");
opt_register_early_noarg("--testnet",
opt_set_specific_network, "testnet",
"Alias for --network=testnet");
Expand Down
13 changes: 8 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,9 @@ else
HAVE_PYTHON3_MAKO=0
fi

if check_command 'lowdown' lowdown; then
HAVE_LOWDOWN=1
else
HAVE_LOWDOWN=0
if ! check_command 'lowdown' lowdown; then
echo "*** We need lowdown!" >&2
exit 1
fi

if echo | check_command sha256sum sha256sum; then
Expand Down Expand Up @@ -615,7 +614,6 @@ add_var ASAN "$ASAN"
add_var UBSAN "$UBSAN"
add_var TEST_NETWORK "$TEST_NETWORK"
add_var HAVE_PYTHON3_MAKO "$HAVE_PYTHON3_MAKO"
add_var HAVE_LOWDOWN "$HAVE_LOWDOWN"
add_var SHA256SUM "$SHA256SUM"
add_var FUZZING "$FUZZING"
add_var RUST "$RUST"
Expand All @@ -631,6 +629,11 @@ while IFS='=' read VAR VAL; do
eval $VAR=\"$VAL\"
done < $CONFIG_VAR_FILE.$$

if [ "$HAVE_GOOD_LIBSODIUM" != 1 ]; then
echo "*** We need a libsodium >= 1.0.4 (released 2015-06-11)." >&2
exit 1
fi

if [ "$HAVE_SQLITE3" = 0 -a "$HAVE_POSTGRES" = 0 ]; then
# I have no database yet I must schema!)
echo "*** We need a database, but neither sqlite3 nor postgres found" >&2
Expand Down
3 changes: 1 addition & 2 deletions devtools/gossipwith.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ int main(int argc, char *argv[])
opt_register_arg("--network", opt_set_network, opt_show_network,
NULL,
"Select the network parameters (bitcoin, testnet, signet,"
" regtest, liquid, liquid-regtest, litecoin or"
" litecoin-testnet)");
" regtest, liquid, or liquid-regtest)");
opt_register_noarg("--must-get-max-messages", opt_set_bool, &no_early_close,
"Fail with exit code 1 unless we reach maximum messages");
opt_register_noarg("--help|-h", opt_usage_and_exit,
Expand Down
9 changes: 0 additions & 9 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,7 @@ RBRACKET=)
$(MARKDOWNPAGES_WITH_EXT): doc/%.7.md: doc/schemas/%.json tools/fromschema.py
@tools/fromschema.py --markdownfile=$@ $< > $@.tmp && mv $@.tmp $@

# If we need to build lowdown, make tools/md2man.sh depend on it.
# That way it's not used in SHA256STAMP (which only uses direct
# dependencies), but make will be forced to build it.
ifeq ($(HAVE_LOWDOWN),0)
LOWDOWN := $(TARGET_DIR)/lowdown-build/bin/lowdown
tools/md2man.sh: $(LOWDOWN)
touch $@
else
LOWDOWN := lowdown
endif

# For versions in documentation, we don't change with every git version, to
# save build time. We build them on new tags or keep them on pre-next-release version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Here's a list of parts, with notes:

- external/ - external libraries from other sources
- libbacktrace - library to provide backtraces when things go wrong.
- libsodium - encryption library (should be replaced soon with built-in)
- libwally-core - bitcoin helper library
- secp256k1 - bitcoin curve encryption library within libwally-core
- jsmn - tiny JSON parsing helper
Expand Down
8 changes: 3 additions & 5 deletions doc/getting-started/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Get dependencies:
sudo apt-get update
sudo apt-get install -y \
jq autoconf automake build-essential git libtool libsqlite3-dev libffi-dev \
python3 python3-pip net-tools zlib1g-dev libsodium-dev gettext
python3 python3-pip net-tools zlib1g-dev libsodium-dev gettext lowdown
pip3 install --upgrade pip
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Expand Down Expand Up @@ -121,8 +121,6 @@ sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \
libsecp256k1-dev lowdown
```

If you can't install `lowdown`, a version will be built in-tree.

If you want to build the Rust plugins (cln-grpc, clnrest, cln-bip353 and wss-proxy):

```shell
Expand Down Expand Up @@ -239,7 +237,7 @@ lightningd --network=testnet
OS version: FreeBSD 11.1-RELEASE or above

```shell
pkg install git python py39-pip gmake libtool gmp sqlite3 postgresql13-client gettext autotools
pkg install git python py39-pip gmake libtool gmp sqlite3 postgresql13-client gettext autotools lowdown libsodium
https://github.com/ElementsProject/lightning.git
pip install --upgrade pip
pip3 install mako
Expand Down Expand Up @@ -331,7 +329,7 @@ make
Assuming you have Xcode and Homebrew installed. Install dependencies:

```shell
brew install autoconf automake libtool python3 gnu-sed gettext libsodium protobuf
brew install autoconf automake libtool python3 gnu-sed gettext libsodium protobuf lowdown
export PATH="/usr/local/opt:$PATH"
```

Expand Down
2 changes: 1 addition & 1 deletion doc/lightning-reckless.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Available option flags:
request additional debug output

**--network**=*network*
specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet,
specify bitcoin, regtest, liquid, liquid-regtest, signet,
or testnet networks. (default: bitcoin)

NOTES
Expand Down
Loading
Loading