diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000000..7c20ee128611 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,144 @@ +version: 2 +jobs: + # publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined + amd64: + machine: + enabled: true + steps: + - checkout + - run: + command: | + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + # + sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f Dockerfile . + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64 + arm32v7: + machine: + enabled: true + steps: + - checkout + - run: + command: | + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + # Make sure the builder is copy the arm emulator + sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset + sed -i -e 's/#EnableQEMU //g' "contrib/linuxarm32v7.Dockerfile" + # + sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f contrib/linuxarm32v7.Dockerfile . + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 + arm64v8: + machine: + enabled: true + steps: + - checkout + - run: + command: | + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + # Make sure the builder is copy the arm emulator + sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset + sed -i -e 's/#EnableQEMU //g' "contrib/linuxarm64v8.Dockerfile" + # + sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f contrib/linuxarm64v8.Dockerfile . + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 + publish_docker_dev: + machine: + enabled: true + steps: + - checkout + - run: + command: | + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + # + sudo docker build --build-arg "DEVELOPER=1" --build-arg "TRACE_TOOLS=false" -t "$DOCKERHUB_REPO:$LATEST_TAG-dev" . + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-dev + publish_docker_bench: + machine: + enabled: true + steps: + - checkout + - run: + command: | + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + # + sudo docker build --build-arg "DEVELOPER=1" --build-arg "TRACE_TOOLS=true" -t "$DOCKERHUB_REPO:$LATEST_TAG-bench" . + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-bench + multiarch: + machine: + enabled: true + image: circleci/classic:201808-01 + steps: + - run: + command: | + # Turn on Experimental features + sudo mkdir $HOME/.docker + sudo sh -c 'echo "{ \"experimental\": \"enabled\" }" >> $HOME/.docker/config.json' + # + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + # + LATEST_TAG=${CIRCLE_TAG:8} #trim "basedon-" from tag + sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 + sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 --os linux --arch amd64 + sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7 + sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8 + sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p + +workflows: + version: 2 + publish: + jobs: + - amd64: + filters: + # ignore any commit on any branch by default + branches: + ignore: /.*/ + # only act on version tags + tags: + only: /basedon-.+/ + - arm32v7: + filters: + # ignore any commit on any branch by default + branches: + ignore: /.*/ + # only act on version tags + tags: + only: /basedon-.+/ + - arm64v8: + filters: + # ignore any commit on any branch by default + branches: + ignore: /.*/ + # only act on version tags + tags: + only: /basedon-.+/ + - publish_docker_dev: + filters: + # ignore any commit on any branch by default + branches: + ignore: /.*/ + # only act on version tags + tags: + only: /basedon-.+/ + - publish_docker_bench: + filters: + # ignore any commit on any branch by default + branches: + ignore: /.*/ + # only act on version tags + tags: + only: /basedon-.+/ + - multiarch: + requires: + - amd64 + - arm32v7 + - arm64v8 + filters: + branches: + ignore: /.*/ + tags: + only: /basedon-.+/ + diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000000..6fd9778d089b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +Dockerfile +linuxarm32v7.Dockerfile +.circleci/config.yml diff --git a/.editorconfig b/.editorconfig index e49de5f5e98a..78d743984d8d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,6 +16,3 @@ indent_size = 8 indent_style = space indent_size = 4 -[.travis.yml] -indent_style = space -indent_size = 2 diff --git a/.gitattributes b/.gitattributes index c40e14769e9a..3e20865f7058 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,8 +7,14 @@ configure text eol=lf # The following files are generated and should not be shown in the # diffs by default on Github. doc/lightning*.7 linguist-generated=true -wallet/db_*_sqlgen.c linguist-generated=true -wallet/statements_gettextgen.po linguist-generated=true +db_*_sqlgen.c linguist-generated=true +statements_gettextgen.po linguist-generated=true *_wiregen.? linguist-generated=true *_printgen.? linguist-generated=true +# The following are marked as binary and generated since they can be +# easily overwritten and don't need deep review. +cln-grpc/proto/node.proto -text -diff linguist-generated=true +cln-grpc/src/convert.rs -text -diff linguist-generated=true +cln-rpc/src/model.rs -text -diff linguist-generated=true +contrib/pyln-testing/pyln/testing/node_pb2.py -text -diff linguist-generated=true \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0b9e50e2c92b..93d668a6efa8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,17 +4,20 @@ # also can optionally require approval from a code owner before the # author can merge a pull request in the repository. -wallet/ @cdecker -*.py @cdecker +cln-grpc/ @cdecker +cln-rpc/ @cdecker +plugins/src/ @cdecker +plugins/grpc-plugin/ @cdecker +contrib/reprobuild/ @cdecker +contrib/msggen/ @cdecker +contrib/pyln-client/ @cdecker +contrib/pyln-testing/ @cdecker +# Needed to ensure hsmd wire compatibility between releases +hsmd/hsmd_wire.csv @cdecker -wallet/invoices.* @ZmnSCPxj +wallet/invoices.* @ZmnSCPxj plugins/multifundchannel.c @ZmnSCPxj -doc/BACKUP.md @ZmnSCPxj @cdecker - -common/param.* @wythe -common/json.* @wythe -common/json_tok.* @wythe -common/wallet_tx.* @wythe +doc/BACKUP.md @ZmnSCPxj # See https://help.github.com/articles/about-codeowners/ for more # information diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index f74f2f646a9e..e1a18acc937b 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -1,8 +1,8 @@ #!/bin/bash - +set -e echo "Running in $(pwd)" export ARCH=${ARCH:-64} -export BOLTDIR=lightning-rfc +export BOLTDIR=bolts export CC=${COMPILER:-gcc} export COMPAT=${COMPAT:-1} export TEST_CHECK_DBSTMTS=${TEST_CHECK_DBSTMTS:-0} @@ -21,30 +21,14 @@ export VALGRIND=${VALGRIND:-0} export FUZZING=${FUZZING:-0} export LIGHTNINGD_POSTGRES_NO_VACUUM=1 -pip3 install --user -U \ - -r requirements.lock - -timeout 60 pip3 install --user \ - --use-feature=in-tree-build \ - ./contrib/pyln-client \ - ./contrib/pyln-proto \ - ./contrib/pyln-testing +# Fail if any commands fail. +set -e -# Install utilities that aren't dependencies, but make -# running tests easier/feasible on CI (and pytest which -# keeps breaking the rerunfailures plugin). -pip3 install --user \ - blinker \ - flake8 \ - flaky \ - mako \ - pytest-sentry \ - pytest-test-groups==1.0.3 \ - pytest-custom-exit-code==0.3.0 \ - pytest-timeout \ - pytest-json-report +pip3 install --user poetry +poetry config virtualenvs.create false --local +poetry install -git clone https://github.com/lightningnetwork/lightning-rfc.git ../lightning-rfc +git clone https://github.com/lightning/bolts.git ../${BOLTDIR} git submodule update --init --recursive ./configure CC="$CC" @@ -52,7 +36,7 @@ cat config.vars cat << EOF > pytest.ini [pytest] -addopts=-p no:logging --color=yes --timeout=1800 --timeout-method=thread --test-group-random-seed=42 --force-flaky --no-success-flaky-report --max-runs=3 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2 +addopts=-p no:logging --color=yes --timeout=1800 --timeout-method=thread --test-group-random-seed=42 markers = slow_test: marks tests as slow (deselect with '-m "not slow_test"') EOF @@ -70,14 +54,14 @@ then export STRIP="$TARGET_HOST"-strip export CONFIGURATION_WRAPPER=qemu-"${TARGET_HOST%%-*}"-static - wget -q https://zlib.net/zlib-1.2.11.tar.gz - tar xf zlib-1.2.11.tar.gz - cd zlib-1.2.11 || exit 1 + wget -q https://zlib.net/zlib-1.2.12.tar.gz + tar xf zlib-1.2.12.tar.gz + cd zlib-1.2.12 || exit 1 ./configure --prefix="$QEMU_LD_PREFIX" make sudo make install cd .. || exit 1 - rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11 + rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12 wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip unzip -q sqlite-src-3260000.zip @@ -108,7 +92,7 @@ then ./configure CC="$TARGET_HOST-gcc" --enable-static - make -j32 CC="$TARGET_HOST-gcc" > /dev/null + make -s -j32 CC="$TARGET_HOST-gcc" else eatmydata make -j32 # shellcheck disable=SC2086 diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index 3833cdd80144..83dd289d024b 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -1,8 +1,10 @@ #!/bin/bash - +set -e export DEBIAN_FRONTEND=noninteractive export BITCOIN_VERSION=0.20.1 export ELEMENTS_VERSION=0.18.1.8 +export RUST_VERSION=stable + sudo useradd -ms /bin/bash tester sudo apt-get update -qq @@ -66,3 +68,8 @@ sudo chmod 0440 /etc/sudoers.d/tester elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.bz2 \ elements-$ELEMENTS_VERSION ) + +if [ "$RUST" == "1" ]; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ + -y --default-toolchain ${RUST_VERSION} +fi diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 6facf4fab6e3..fee739519814 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -1,10 +1,14 @@ name: FreeBSD Test -on: [push, pull_request] +on: + push: + branches: + - "master" + pull_request: jobs: testfreebsd: - runs-on: macos-latest + runs-on: macos-10.15 name: Build and test on FreeBSD env: DEVELOPER: 1 @@ -35,6 +39,7 @@ jobs: bash \ gettext \ sqlite3 \ + lowdown \ curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2021-08-3z1 @@ -59,13 +64,14 @@ jobs: blinker \ flake8 \ mako \ - mrkd \ pytest-sentry \ pytest-test-groups==1.0.3 \ pytest-custom-exit-code==0.3.0 \ pytest-json-report - git clone https://github.com/lightningnetwork/lightning-rfc.git ../lightning-rfc + 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` git submodule update --init --recursive ./configure CC="$CC" @@ -73,7 +79,7 @@ jobs: cat << EOF > pytest.ini [pytest] - addopts=-p no:logging --color=yes --timeout=1800 --timeout-method=thread --test-group-random-seed=42 --force-flaky --no-success-flaky-report --max-runs=3 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2 + addopts=-p no:logging --color=yes --timeout=1800 --timeout-method=thread --test-group-random-seed=42 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2 markers = slow_test: marks tests as slow (deselect with '-m "not slow_test"') EOF diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89c39b0793c0..e568e936d182 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,15 @@ --- name: Continuous Integration -on: [push, pull_request] +on: + push: + branches: + - "master" + pull_request: jobs: smoke-test: name: Smoke Test ${{ matrix.cfg }} runs-on: ubuntu-20.04 + timeout-minutes: 300 env: DEVELOPER: 1 VALGRIND: 0 @@ -14,8 +19,9 @@ jobs: fail-fast: true matrix: include: - - CFG: "make" - TEST_CMD: "make" + - CFG: "make and unit test w/ VALGRIND" + TEST_CMD: "make default check-source" + VALGRIND: 1 - CFG: "make-O3-check" TEST_CMD: "make check-source check-units installcheck check-gen-updated" COPTFLAGS: "-O3" @@ -30,13 +36,10 @@ jobs: - name: Checkout uses: actions/checkout@v2.0.0 - - name: Fetch tags for auto versioning - run: git fetch --prune --unshallow --tags -f - - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Install dependencies run: | @@ -68,48 +71,64 @@ jobs: path: report.* if-no-files-found: ignore - proto-test: - name: Protocol Test Config + check-dock: + name: Check core-lightning doc runs-on: ubuntu-20.04 - needs: [smoke-test] env: DEVELOPER: 1 - EXPERIMENTAL_FEATURES: 1 - COMPAT: 0 - PYTEST_PAR: 2 - TEST_CMD: "make check-protos" - TEST_GROUP: 1 - TEST_GROUP_COUNT: 1 - strategy: - fail-fast: true - matrix: - include: - - {compiler: clang, db: sqlite3} - - {compiler: gcc, db: postgres} + VALGRIND: 0 + EXPERIMENTAL_FEATURES: 0 + COMPAT: 1 steps: - name: Checkout uses: actions/checkout@v2.0.0 - - name: Setup Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Install dependencies - run: | - bash -x .github/scripts/setup.sh + run: bash -x .github/scripts/setup.sh - - name: Build - env: - ARCH: ${{ matrix.arch }} - COMPILER: ${{ matrix.compiler }} - DB: ${{ matrix.db }} - NETWORK: ${{ matrix.network }} - TARGET_HOST: ${{ matrix.TARGET_HOST }} - VALGRIND: ${{ matrix.valgrind }} + - name: Check Doc run: | - bash -x .github/scripts/build.sh + pip install mako + ./configure + make check-doc + proto-test: + name: Protocol Test Config + runs-on: ubuntu-22.04 + timeout-minutes: 300 + needs: [smoke-test] + strategy: + fail-fast: true + matrix: + include: + - {compiler: clang, db: sqlite3} + - {compiler: gcc, db: postgres} + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + - name: Build and run + run: | + docker build -f contrib/docker/Dockerfile.ubuntu -t cln-ci-ubuntu . + docker run -e ARCH=${{ matrix.arch }} \ + -e COMPILER=${{ matrix.compiler }} \ + -e DB=${{ matrix.db }} \ + -e NETWORK=${{ matrix.network }} \ + -e TARGET_HOST=${{ matrix.TARGET_HOST }} \ + -e VALGRIND=${{ matrix.valgrind }} \ + -e DEVELOPER=1 \ + -e EXPERIMENTAL_FEATURES=1 \ + -e COMPAT=0 \ + -e PYTEST_PAR=2 \ + -e PYTEST_OPTS="--timeout=300" \ + -e TEST_CMD="make check-protos" \ + -e TEST_GROUP=1 \ + -e TEST_GROUP_COUNT=1 \ + cln-ci-ubuntu - name: Upload Unit Test Results if: always() uses: actions/upload-artifact@v2 @@ -173,10 +192,10 @@ jobs: - name: Checkout uses: actions/checkout@v2.0.0 - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Install dependencies run: | @@ -195,6 +214,7 @@ jobs: PYTEST_PAR: ${{ matrix.PYTEST_PAR }} PYTEST_OPTS: ${{ matrix.PYTEST_OPTS }} NETWORK: ${{ matrix.NETWORK }} + TEST_CHECK_DBSTMTS: ${{ matrix.TEST_CHECK_DBSTMTS }} TEST_CMD: ${{ matrix.TEST_CMD }} TEST_GROUP_COUNT: ${{ matrix.TEST_GROUP_COUNT }} TEST_GROUP: ${{ matrix.TEST_GROUP }} @@ -278,10 +298,10 @@ jobs: - name: Checkout uses: actions/checkout@v2.0.0 - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Install dependencies run: | @@ -311,3 +331,37 @@ jobs: with: name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }} path: report.* + + rust-test: + name: Rust Test Config + runs-on: ubuntu-20.04 + needs: [smoke-test] + env: + DEVELOPER: 1 + RUST: 1 + VALGRIND: 0 + # Run only the rust tests, others are not impacted. + TEST_CMD: "make -j 8 && pytest -vvv tests/test_cln_rs.py" + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Install dependencies + run: | + bash -x .github/scripts/setup.sh + + - name: Build + run: | + bash -x .github/scripts/build.sh + + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v2 + with: + name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }} + path: report.* diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml new file mode 100644 index 000000000000..7683c539d4ae --- /dev/null +++ b/.github/workflows/ci_build.yml @@ -0,0 +1,17 @@ +name: CI Compilation testing + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - { OS: alpine } + steps: + - uses: actions/checkout@v2 + - name: Integration testing + run: | + docker build -f contrib/docker/Dockerfile.${{matrix.OS}} -t clightning-${{matrix.OS}} . diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 027a537f84d5..58ba7bae5997 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -1,6 +1,7 @@ --- name: Mac OS pytest -on: [pull_request] +on: + pull_request: jobs: smoke-test: name: Smoke Test macOS @@ -16,16 +17,9 @@ jobs: - name: Checkout uses: actions/checkout@v2.0.0 - - name: Fetch tags for auto versioning - run: git fetch --prune --unshallow --tags - - - name: Set up Python 3.6 - uses: actions/setup-python@v2 - with: - python-version: 3.6 - - name: Install dependencies run: | + export PATH="/usr/local/opt:/Users/runner/.local/bin:/Users/runner/Library/Python/3.10/bin:$PATH" export BITCOIN_VERSION=0.20.1 brew install wget python autoconf automake libtool python3 gmp gnu-sed gettext libsodium @@ -36,7 +30,10 @@ jobs: sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin ) - pip install --upgrade mako pip + pip3 install --user poetry + poetry config virtualenvs.create false --local + poetry install + ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt export PATH="/usr/local/opt:$PATH" @@ -56,47 +53,16 @@ jobs: TEST_GROUP_COUNT: ${{ matrix.TEST_GROUP_COUNT }} TEST_GROUP: ${{ matrix.TEST_GROUP }} run: | - export PATH="/usr/local/opt:/Users/runner/.local/bin:$PATH" + export PATH="/usr/local/opt:/Users/runner/.local/bin:/Users/runner/Library/Python/3.10/bin:$PATH" export LDFLAGS="-L/usr/local/opt/sqlite/lib" export CPPFLAGS="-I/usr/local/opt/sqlite/include" - pip3 install --user -U \ - -r requirements.lock - - pip3 install --user --no-index \ - --use-feature=in-tree-build \ - ./contrib/pyln-spec/bolt7 \ - ./contrib/pyln-client \ - ./contrib/pyln-proto \ - ./contrib/pyln-testing - - # Install utilities that aren't dependencies, but make - # running tests easier/feasible on CI (and pytest which - # keeps breaking the rerunfailures plugin). - pip3 install --user -U \ - blinker \ - flake8 \ - flaky \ - mako \ - pytest-sentry \ - pytest-test-groups==1.0.3 \ - pytest-custom-exit-code==0.3.0 \ - pytest-json-report - cat << EOF > pytest.ini [pytest] - addopts=-p no:logging --color=yes --timeout=600 --timeout-method=thread --test-group-random-seed=42 --force-flaky --no-success-flaky-report --max-runs=3 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2 + addopts=-p no:logging --color=yes --timeout=600 --timeout-method=thread --test-group-random-seed=42 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2 markers = slow_test: marks tests as slow (deselect with '-m "not slow_test"') EOF ./configure make - - - name: Upload Unit Test Results - if: always() - uses: actions/upload-artifact@v2 - with: - name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }} - path: report.* - if-no-files-found: ignore diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 6e08825477da..3362867d9766 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -5,6 +5,11 @@ on: push: branches: - master + tags: + # Semantic versioning tags + - 'v[0-9]+.[0-9]+.[0-9]+' + # Date style tags + - 'v[0-9]{2}.[0-9]{2}' jobs: deploy: name: Build and publish ${{ matrix.package }} 🐍 @@ -19,14 +24,15 @@ jobs: WORKDIR: contrib/pyln-testing - PACKAGE: pyln-proto WORKDIR: contrib/pyln-proto - - PACKAGE: pyn-bolt1 - WORKDIR: contrib/pyln-spec/bolt1/ - - PACKAGE: pyn-bolt2 - WORKDIR: contrib/pyln-spec/bolt2/ - - PACKAGE: pyn-bolt4 - WORKDIR: contrib/pyln-spec/bolt4/ - - PACKAGE: pyn-bolt7 - WORKDIR: contrib/pyln-spec/bolt7/ + # Bolt packages are handled differently + #- PACKAGE: pyn-bolt1 + # WORKDIR: contrib/pyln-spec/bolt1/ + #- PACKAGE: pyn-bolt2 + # WORKDIR: contrib/pyln-spec/bolt2/ + #- PACKAGE: pyn-bolt4 + # WORKDIR: contrib/pyln-spec/bolt4/ + #- PACKAGE: pyn-bolt7 + # WORKDIR: contrib/pyln-spec/bolt7/ steps: - uses: actions/checkout@master with: @@ -38,35 +44,41 @@ jobs: with: python-version: 3.7 - - name: Install pypa/build + - name: Install pypa/build and poetry run: >- - python -m pip install build --user + python -m pip install build poetry --user + + - name: Check version tag + run: >- + git describe --always --dirty=-modded --abbrev=7 - name: Build a binary wheel and a source tarball env: WORKDIR: ${{ matrix.WORKDIR }} - run: >- - cd ${{ env.WORKDIR}} && - python -m build --sdist --wheel --outdir dist/ . + run: | + export VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}') + cd ${{ env.WORKDIR}} + make upgrade-version NEW_VERSION=$VERSION + poetry build - name: Publish distribution 📦 to Test PyPI if: github.repository == 'ElementsProject/lightning' - uses: pypa/gh-action-pypi-publish@master env: + POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }} WORKDIR: ${{ matrix.WORKDIR }} - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - packages_dir: "${{ env.WORKDIR}}/dist" - skip_existing: true + run: | + cd ${{ env.WORKDIR}} + poetry config repositories.testpypi https://test.pypi.org/legacy/ + poetry publish --repository testpypi --no-interaction - name: Publish distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags') && github.repository == 'ElementsProject/lightning' - uses: pypa/gh-action-pypi-publish@master env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} WORKDIR: ${{ matrix.WORKDIR }} - with: - password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: "${{ env.WORKDIR}}/dist" - # We should never have a conflict here, the version tags are unique - skip_existing: false + run: | + cd ${{ env.WORKDIR}} + export VERSION=$(git describe --abbrev=0) + make upgrade-version NEW_VERSION=$VERSION + poetry config repositories.testpypi https://test.pypi.org/legacy/ + poetry publish --repository testpypi --no-interaction diff --git a/.gitignore b/.gitignore index a1295d37823a..8ddca96722c1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ *.dSYM *.rej *.pyc +*.tmp +libccan.a .cppcheck-suppress .mypy_cache TAGS @@ -32,6 +34,8 @@ monkeytype.sqlite3 !*/test/run-*.c */test/exp-run-* !*/test/exp-run-*.c +*/*/test/run-* +!*/*/test/run-*.c test/test_protocol test/test_sphinx tests/.pytest.restart @@ -47,9 +51,9 @@ contrib/pylightning/pylightning.egg-info/ contrib/pyln-*/build/ contrib/pyln-*/dist/ contrib/pyln-*/pyln_*.egg-info/ -release/ +contrib/pyln-*/.eggs/ +contrib/pyln-*/pyln/*/__version__.py tests/plugins/test_selfdisable_after_getmanifest -.DS_Store # Ignore generated files devtools/features @@ -58,3 +62,21 @@ doc/lightning*.[1578] *_wiregen.[ch] *_printgen.[ch] *_gettextgen.po +tests/node_pb2.py +tests/node_pb2_grpc.py +tests/primitives_pb2.py +tests/primitives_pb2_grpc.py + +# Ignore unrelated stuff +.DS_Store +.gdb_history + +# Rust targets +target +plugins/cln-grpc + +# Build directories +bionic/ +focal/ +jammy/ +release/ diff --git a/.gitmodules b/.gitmodules index 095547408073..100691cdbde8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,4 +16,9 @@ url = https://github.com/valyala/gheap [submodule "external/lnprototest"] path = external/lnprototest - url = https://github.com/rustyrussell/lnprototest.git + url = https://github.com/niftynei/lnprototest.git + branch = nifty/ripemd160-fallback +[submodule "external/lowdown"] + path = external/lowdown + url = https://github.com/kristapsdz/lowdown.git + ignore = dirty diff --git a/.msggen.json b/.msggen.json new file mode 100644 index 000000000000..d8298fc29a66 --- /dev/null +++ b/.msggen.json @@ -0,0 +1,1138 @@ +{ + "grpc-enum-map": { + "CloseType": { + "mutual": 0, + "unilateral": 1, + "unopened": 2 + }, + "ConnectAddressType": { + "ipv4": 1, + "ipv6": 2, + "local socket": 0, + "torv2": 3, + "torv3": 4 + }, + "ConnectDirection": { + "in": 0, + "out": 1 + }, + "CreateinvoiceStatus": { + "expired": 1, + "paid": 0, + "unpaid": 2 + }, + "DatastoreMode": { + "create-or-append": 4, + "create-or-replace": 2, + "must-append": 3, + "must-create": 0, + "must-replace": 1 + }, + "DelinvoiceStatus": { + "expired": 1, + "paid": 0, + "unpaid": 2 + }, + "FeeratesStyle": { + "perkb": 0, + "perkw": 1 + }, + "GetinfoAddressType": { + "dns": 0, + "ipv4": 1, + "ipv6": 2, + "torv2": 3, + "torv3": 4, + "websocket": 5 + }, + "GetinfoBindingType": { + "ipv4": 1, + "ipv6": 2, + "local socket": 0, + "torv2": 3, + "torv3": 4 + }, + "GetrouteRouteStyle": { + "tlv": 0 + }, + "KeysendStatus": { + "complete": 0 + }, + "ListforwardsForwardsStatus": { + "failed": 3, + "local_failed": 2, + "offered": 0, + "settled": 1 + }, + "ListforwardsForwardsStyle": { + "legacy": 0, + "tlv": 1 + }, + "ListforwardsStatus": { + "failed": 3, + "local_failed": 2, + "offered": 0, + "settled": 1 + }, + "ListfundsOutputsStatus": { + "confirmed": 1, + "spent": 2, + "unconfirmed": 0 + }, + "ListinvoicesInvoicesStatus": { + "expired": 2, + "paid": 1, + "unpaid": 0 + }, + "ListnodesNodesAddressesType": { + "dns": 0, + "ipv4": 1, + "ipv6": 2, + "torv2": 3, + "torv3": 4, + "websocket": 5 + }, + "ListpaysPaysStatus": { + "complete": 2, + "failed": 1, + "pending": 0 + }, + "ListpaysStatus": { + "complete": 1, + "failed": 2, + "pending": 0 + }, + "ListpeersPeersChannelsHtlcsDirection": { + "in": 0, + "out": 1 + }, + "ListpeersPeersChannelsHtlcsState": { + "RCVD_ADD_ACK_COMMIT": 3, + "RCVD_ADD_REVOCATION": 2, + "RCVD_REMOVE_ACK_REVOCATION": 9, + "RCVD_REMOVE_COMMIT": 6, + "RCVD_REMOVE_HTLC": 5, + "SENT_ADD_ACK_REVOCATION": 4, + "SENT_ADD_COMMIT": 1, + "SENT_ADD_HTLC": 0, + "SENT_REMOVE_ACK_COMMIT": 8, + "SENT_REMOVE_REVOCATION": 7 + }, + "ListpeersPeersChannelsState": { + "AWAITING_UNILATERAL": 6, + "CHANNELD_AWAITING_LOCKIN": 1, + "CHANNELD_NORMAL": 2, + "CHANNELD_SHUTTING_DOWN": 3, + "CLOSINGD_COMPLETE": 5, + "CLOSINGD_SIGEXCHANGE": 4, + "DUALOPEND_AWAITING_LOCKIN": 10, + "DUALOPEND_OPEN_INIT": 9, + "FUNDING_SPEND_SEEN": 7, + "ONCHAIN": 8, + "OPENINGD": 0 + }, + "ListpeersPeersLogType": { + "BROKEN": 1, + "DEBUG": 4, + "INFO": 3, + "IO_IN": 5, + "IO_OUT": 6, + "SKIPPED": 0, + "UNUSUAL": 2 + }, + "ListsendpaysPaymentsStatus": { + "complete": 2, + "failed": 1, + "pending": 0 + }, + "ListsendpaysStatus": { + "complete": 1, + "failed": 2, + "pending": 0 + }, + "ListtransactionsTransactionsInputsType": { + "channel_funding": 3, + "channel_htlc_success": 7, + "channel_htlc_timeout": 8, + "channel_mutual_close": 4, + "channel_penalty": 9, + "channel_sweep": 6, + "channel_unilateral_cheat": 10, + "channel_unilateral_close": 5, + "deposit": 1, + "theirs": 0, + "withdraw": 2 + }, + "ListtransactionsTransactionsOutputsType": { + "channel_funding": 3, + "channel_htlc_success": 7, + "channel_htlc_timeout": 8, + "channel_mutual_close": 4, + "channel_penalty": 9, + "channel_sweep": 6, + "channel_unilateral_cheat": 10, + "channel_unilateral_close": 5, + "deposit": 1, + "theirs": 0, + "withdraw": 2 + }, + "NewaddrAddresstype": { + "all": 2, + "bech32": 0, + "p2sh-segwit": 1 + }, + "PayStatus": { + "complete": 0, + "failed": 2, + "pending": 1 + }, + "SendonionStatus": { + "complete": 1, + "pending": 0 + }, + "SendpayStatus": { + "complete": 1, + "pending": 0 + }, + "WaitanyinvoiceStatus": { + "expired": 1, + "paid": 0 + }, + "WaitinvoiceStatus": { + "expired": 1, + "paid": 0 + }, + "WaitsendpayStatus": { + "complete": 0 + } + }, + "grpc-field-map": { + "AddgossipRequest": { + "AddGossip.message": 1 + }, + "AutocleaninvoiceRequest": { + "AutoCleanInvoice.cycle_seconds": 2, + "AutoCleanInvoice.expired_by": 1 + }, + "AutocleaninvoiceResponse": { + "AutoCleanInvoice.cycle_seconds": 3, + "AutoCleanInvoice.enabled": 1, + "AutoCleanInvoice.expired_by": 2 + }, + "CheckmessageRequest": { + "CheckMessage.message": 1, + "CheckMessage.pubkey": 3, + "CheckMessage.zbase": 2 + }, + "CheckmessageResponse": { + "CheckMessage.pubkey": 2, + "CheckMessage.verified": 1 + }, + "CloseRequest": { + "Close.destination": 3, + "Close.fee_negotiation_step": 4, + "Close.feerange[]": 7, + "Close.force_lease_closed": 6, + "Close.id": 1, + "Close.unilateraltimeout": 2, + "Close.wrong_funding": 5 + }, + "CloseResponse": { + "Close.tx": 2, + "Close.txid": 3, + "Close.type": 1 + }, + "ConnectAddress": { + "Connect.address.address": 3, + "Connect.address.port": 4, + "Connect.address.socket": 2, + "Connect.address.type": 1 + }, + "ConnectRequest": { + "Connect.host": 2, + "Connect.id": 1, + "Connect.port": 3 + }, + "ConnectResponse": { + "Connect.address": 4, + "Connect.direction": 3, + "Connect.features": 2, + "Connect.id": 1 + }, + "CreateinvoiceRequest": { + "CreateInvoice.invstring": 1, + "CreateInvoice.label": 2, + "CreateInvoice.preimage": 3 + }, + "CreateinvoiceResponse": { + "CreateInvoice.amount_msat": 5, + "CreateInvoice.amount_received_msat": 10, + "CreateInvoice.bolt11": 2, + "CreateInvoice.bolt12": 3, + "CreateInvoice.description": 7, + "CreateInvoice.expires_at": 8, + "CreateInvoice.label": 1, + "CreateInvoice.local_offer_id": 13, + "CreateInvoice.paid_at": 11, + "CreateInvoice.pay_index": 9, + "CreateInvoice.payer_note": 14, + "CreateInvoice.payment_hash": 4, + "CreateInvoice.payment_preimage": 12, + "CreateInvoice.status": 6 + }, + "CreateonionHops": { + "CreateOnion.hops[].payload": 2, + "CreateOnion.hops[].pubkey": 1 + }, + "CreateonionRequest": { + "CreateOnion.assocdata": 2, + "CreateOnion.hops[]": 1, + "CreateOnion.onion_size": 4, + "CreateOnion.session_key": 3 + }, + "CreateonionResponse": { + "CreateOnion.onion": 1, + "CreateOnion.shared_secrets[]": 2 + }, + "DatastoreRequest": { + "Datastore.generation": 4, + "Datastore.hex": 2, + "Datastore.key": 5, + "Datastore.key[]": 1, + "Datastore.mode": 3, + "Datastore.string": 6 + }, + "DatastoreResponse": { + "Datastore.generation": 2, + "Datastore.hex": 3, + "Datastore.key": 5, + "Datastore.key[]": 1, + "Datastore.string": 4 + }, + "DeldatastoreRequest": { + "DelDatastore.generation": 2, + "DelDatastore.key": 3, + "DelDatastore.key[]": 1 + }, + "DeldatastoreResponse": { + "DelDatastore.generation": 2, + "DelDatastore.hex": 3, + "DelDatastore.key": 5, + "DelDatastore.key[]": 1, + "DelDatastore.string": 4 + }, + "DelexpiredinvoiceRequest": { + "DelExpiredInvoice.maxexpirytime": 1 + }, + "DelinvoiceRequest": { + "DelInvoice.desconly": 3, + "DelInvoice.label": 1, + "DelInvoice.status": 2 + }, + "DelinvoiceResponse": { + "DelInvoice.amount_msat": 4, + "DelInvoice.bolt11": 2, + "DelInvoice.bolt12": 3, + "DelInvoice.description": 5, + "DelInvoice.expires_at": 8, + "DelInvoice.label": 1, + "DelInvoice.local_offer_id": 9, + "DelInvoice.payer_note": 10, + "DelInvoice.payment_hash": 6, + "DelInvoice.status": 7 + }, + "DisconnectRequest": { + "Disconnect.force": 2, + "Disconnect.id": 1 + }, + "FeeratesOnchain_fee_estimates": { + "Feerates.onchain_fee_estimates.htlc_success_satoshis": 5, + "Feerates.onchain_fee_estimates.htlc_timeout_satoshis": 4, + "Feerates.onchain_fee_estimates.mutual_close_satoshis": 2, + "Feerates.onchain_fee_estimates.opening_channel_satoshis": 1, + "Feerates.onchain_fee_estimates.unilateral_close_satoshis": 3 + }, + "FeeratesPerkb": { + "Feerates.perkb.delayed_to_us": 6, + "Feerates.perkb.htlc_resolution": 7, + "Feerates.perkb.max_acceptable": 2, + "Feerates.perkb.min_acceptable": 1, + "Feerates.perkb.mutual_close": 4, + "Feerates.perkb.opening": 3, + "Feerates.perkb.penalty": 8, + "Feerates.perkb.unilateral_close": 5 + }, + "FeeratesPerkw": { + "Feerates.perkw.delayed_to_us": 6, + "Feerates.perkw.htlc_resolution": 7, + "Feerates.perkw.max_acceptable": 2, + "Feerates.perkw.min_acceptable": 1, + "Feerates.perkw.mutual_close": 4, + "Feerates.perkw.opening": 3, + "Feerates.perkw.penalty": 8, + "Feerates.perkw.unilateral_close": 5 + }, + "FeeratesRequest": { + "Feerates.style": 1 + }, + "FeeratesResponse": { + "Feerates.onchain_fee_estimates": 4, + "Feerates.perkb": 2, + "Feerates.perkw": 3, + "Feerates.warning_missing_feerates": 1 + }, + "FundchannelRequest": { + "FundChannel.amount": 1, + "FundChannel.announce": 3, + "FundChannel.close_to": 6, + "FundChannel.compact_lease": 8, + "FundChannel.feerate": 2, + "FundChannel.id": 9, + "FundChannel.minconf": 10, + "FundChannel.minconf[]": 4, + "FundChannel.mindepth": 12, + "FundChannel.push_msat": 5, + "FundChannel.request_amt": 7, + "FundChannel.reserve": 13, + "FundChannel.utxos[]": 11 + }, + "FundchannelResponse": { + "FundChannel.channel_id": 4, + "FundChannel.close_to": 5, + "FundChannel.mindepth": 6, + "FundChannel.outnum": 3, + "FundChannel.tx": 1, + "FundChannel.txid": 2 + }, + "FundpsbtRequest": { + "FundPsbt.excess_as_change": 8, + "FundPsbt.feerate": 2, + "FundPsbt.locktime": 6, + "FundPsbt.min_witness_weight": 7, + "FundPsbt.minconf": 4, + "FundPsbt.reserve": 5, + "FundPsbt.satoshi": 1, + "FundPsbt.startweight": 3 + }, + "FundpsbtReservations": { + "FundPsbt.reservations[].reserved": 4, + "FundPsbt.reservations[].reserved_to_block": 5, + "FundPsbt.reservations[].txid": 1, + "FundPsbt.reservations[].vout": 2, + "FundPsbt.reservations[].was_reserved": 3 + }, + "FundpsbtResponse": { + "FundPsbt.change_outnum": 5, + "FundPsbt.estimated_final_weight": 3, + "FundPsbt.excess_msat": 4, + "FundPsbt.feerate_per_kw": 2, + "FundPsbt.psbt": 1, + "FundPsbt.reservations[]": 6 + }, + "GetinfoAddress": { + "Getinfo.address[].address": 3, + "Getinfo.address[].port": 2, + "Getinfo.address[].type": 1 + }, + "GetinfoBinding": { + "Getinfo.binding[].address": 2, + "Getinfo.binding[].port": 3, + "Getinfo.binding[].socket": 4, + "Getinfo.binding[].type": 1 + }, + "GetinfoOur_features": { + "Getinfo.our_features.channel": 3, + "Getinfo.our_features.init": 1, + "Getinfo.our_features.invoice": 4, + "Getinfo.our_features.node": 2 + }, + "GetinfoResponse": { + "Getinfo.address[]": 14, + "Getinfo.alias": 2, + "Getinfo.binding[]": 15, + "Getinfo.blockheight": 11, + "Getinfo.color": 3, + "Getinfo.fees_collected_msat": 13, + "Getinfo.id": 1, + "Getinfo.lightning-dir": 9, + "Getinfo.msatoshi_fees_collected": 18, + "Getinfo.network": 12, + "Getinfo.num_active_channels": 6, + "Getinfo.num_inactive_channels": 7, + "Getinfo.num_peers": 4, + "Getinfo.num_pending_channels": 5, + "Getinfo.our_features": 10, + "Getinfo.version": 8, + "Getinfo.warning_bitcoind_sync": 16, + "Getinfo.warning_lightningd_sync": 17 + }, + "GetrouteRequest": { + "GetRoute.amount_msat": 9, + "GetRoute.cltv": 4, + "GetRoute.exclude[]": 7, + "GetRoute.fromid": 5, + "GetRoute.fuzzpercent": 6, + "GetRoute.id": 1, + "GetRoute.maxhops": 8, + "GetRoute.msatoshi": 2, + "GetRoute.riskfactor": 3 + }, + "GetrouteResponse": { + "GetRoute.route[]": 1 + }, + "GetrouteRoute": { + "GetRoute.route[].amount_msat": 4, + "GetRoute.route[].channel": 2, + "GetRoute.route[].delay": 5, + "GetRoute.route[].direction": 3, + "GetRoute.route[].id": 1, + "GetRoute.route[].msatoshi": 7, + "GetRoute.route[].style": 6 + }, + "InvoiceRequest": { + "Invoice.amount_msat": 10, + "Invoice.cltv": 6, + "Invoice.deschashonly": 9, + "Invoice.description": 2, + "Invoice.expiry": 7, + "Invoice.exposeprivatechannels": 8, + "Invoice.fallbacks[]": 4, + "Invoice.label": 3, + "Invoice.msatoshi": 1, + "Invoice.preimage": 5 + }, + "InvoiceResponse": { + "Invoice.bolt11": 1, + "Invoice.expires_at": 4, + "Invoice.payment_hash": 2, + "Invoice.payment_secret": 3, + "Invoice.warning_capacity": 5, + "Invoice.warning_deadends": 7, + "Invoice.warning_mpp": 9, + "Invoice.warning_offline": 6, + "Invoice.warning_private_unused": 8 + }, + "KeysendRequest": { + "KeySend.amount_msat": 10, + "KeySend.destination": 1, + "KeySend.exemptfee": 7, + "KeySend.extratlvs": 9, + "KeySend.label": 3, + "KeySend.maxdelay": 6, + "KeySend.maxfeepercent": 4, + "KeySend.msatoshi": 2, + "KeySend.retry_for": 5, + "KeySend.routehints": 8 + }, + "KeysendResponse": { + "KeySend.amount_msat": 6, + "KeySend.amount_sent_msat": 7, + "KeySend.created_at": 4, + "KeySend.destination": 2, + "KeySend.parts": 5, + "KeySend.payment_hash": 3, + "KeySend.payment_preimage": 1, + "KeySend.status": 9, + "KeySend.warning_partial_completion": 8 + }, + "ListchannelsChannels": { + "ListChannels.channels[].active": 8, + "ListChannels.channels[].amount_msat": 5, + "ListChannels.channels[].base_fee_millisatoshi": 10, + "ListChannels.channels[].channel_flags": 7, + "ListChannels.channels[].delay": 12, + "ListChannels.channels[].destination": 2, + "ListChannels.channels[].features": 15, + "ListChannels.channels[].fee_per_millionth": 11, + "ListChannels.channels[].htlc_maximum_msat": 14, + "ListChannels.channels[].htlc_minimum_msat": 13, + "ListChannels.channels[].last_update": 9, + "ListChannels.channels[].message_flags": 6, + "ListChannels.channels[].public": 4, + "ListChannels.channels[].short_channel_id": 3, + "ListChannels.channels[].source": 1 + }, + "ListchannelsRequest": { + "ListChannels.destination": 3, + "ListChannels.short_channel_id": 1, + "ListChannels.source": 2 + }, + "ListchannelsResponse": { + "ListChannels.channels[]": 1 + }, + "ListdatastoreDatastore": { + "ListDatastore.datastore[].generation": 2, + "ListDatastore.datastore[].hex": 3, + "ListDatastore.datastore[].key[]": 1, + "ListDatastore.datastore[].string": 4 + }, + "ListdatastoreRequest": { + "ListDatastore.key": 2, + "ListDatastore.key[]": 1 + }, + "ListdatastoreResponse": { + "ListDatastore.datastore[]": 1 + }, + "ListforwardsForwards": { + "ListForwards.forwards[].fee_msat": 7, + "ListForwards.forwards[].in_channel": 1, + "ListForwards.forwards[].in_htlc_id": 10, + "ListForwards.forwards[].in_msat": 2, + "ListForwards.forwards[].out_channel": 5, + "ListForwards.forwards[].out_htlc_id": 11, + "ListForwards.forwards[].out_msat": 8, + "ListForwards.forwards[].payment_hash": 6, + "ListForwards.forwards[].received_time": 4, + "ListForwards.forwards[].status": 3, + "ListForwards.forwards[].style": 9 + }, + "ListforwardsRequest": { + "ListForwards.in_channel": 2, + "ListForwards.out_channel": 3, + "ListForwards.status": 1 + }, + "ListforwardsResponse": { + "ListForwards.forwards[]": 1 + }, + "ListfundsChannels": { + "ListFunds.channels[].amount_msat": 3, + "ListFunds.channels[].connected": 6, + "ListFunds.channels[].funding_output": 5, + "ListFunds.channels[].funding_txid": 4, + "ListFunds.channels[].our_amount_msat": 2, + "ListFunds.channels[].peer_id": 1, + "ListFunds.channels[].short_channel_id": 8, + "ListFunds.channels[].state": 7 + }, + "ListfundsOutputs": { + "ListFunds.outputs[].address": 5, + "ListFunds.outputs[].amount_msat": 3, + "ListFunds.outputs[].blockheight": 8, + "ListFunds.outputs[].output": 2, + "ListFunds.outputs[].redeemscript": 6, + "ListFunds.outputs[].reserved": 9, + "ListFunds.outputs[].scriptpubkey": 4, + "ListFunds.outputs[].status": 7, + "ListFunds.outputs[].txid": 1 + }, + "ListfundsRequest": { + "ListFunds.spent": 1 + }, + "ListfundsResponse": { + "ListFunds.channels[]": 2, + "ListFunds.outputs[]": 1 + }, + "ListinvoicesInvoices": { + "ListInvoices.invoices[].amount_msat": 6, + "ListInvoices.invoices[].amount_received_msat": 12, + "ListInvoices.invoices[].bolt11": 7, + "ListInvoices.invoices[].bolt12": 8, + "ListInvoices.invoices[].description": 2, + "ListInvoices.invoices[].expires_at": 5, + "ListInvoices.invoices[].label": 1, + "ListInvoices.invoices[].local_offer_id": 9, + "ListInvoices.invoices[].paid_at": 13, + "ListInvoices.invoices[].pay_index": 11, + "ListInvoices.invoices[].payer_note": 10, + "ListInvoices.invoices[].payment_hash": 3, + "ListInvoices.invoices[].payment_preimage": 14, + "ListInvoices.invoices[].status": 4 + }, + "ListinvoicesRequest": { + "ListInvoices.invstring": 2, + "ListInvoices.label": 1, + "ListInvoices.offer_id": 4, + "ListInvoices.payment_hash": 3 + }, + "ListinvoicesResponse": { + "ListInvoices.invoices[]": 1 + }, + "ListnodesNodes": { + "ListNodes.nodes[].addresses[]": 6, + "ListNodes.nodes[].alias": 3, + "ListNodes.nodes[].color": 4, + "ListNodes.nodes[].features": 5, + "ListNodes.nodes[].last_timestamp": 2, + "ListNodes.nodes[].nodeid": 1 + }, + "ListnodesNodesAddresses": { + "ListNodes.nodes[].addresses[].address": 3, + "ListNodes.nodes[].addresses[].port": 2, + "ListNodes.nodes[].addresses[].type": 1 + }, + "ListnodesRequest": { + "ListNodes.id": 1 + }, + "ListnodesResponse": { + "ListNodes.nodes[]": 1 + }, + "ListpaysPays": { + "ListPays.pays[].amount_msat": 8, + "ListPays.pays[].amount_sent_msat": 9, + "ListPays.pays[].bolt11": 6, + "ListPays.pays[].bolt12": 7, + "ListPays.pays[].completed_at": 12, + "ListPays.pays[].created_at": 4, + "ListPays.pays[].description": 11, + "ListPays.pays[].destination": 3, + "ListPays.pays[].erroronion": 10, + "ListPays.pays[].label": 5, + "ListPays.pays[].number_of_parts": 14, + "ListPays.pays[].payment_hash": 1, + "ListPays.pays[].preimage": 13, + "ListPays.pays[].status": 2 + }, + "ListpaysRequest": { + "ListPays.bolt11": 1, + "ListPays.payment_hash": 2, + "ListPays.status": 3 + }, + "ListpaysResponse": { + "ListPays.pays[]": 1 + }, + "ListpeersPeers": { + "ListPeers.peers[].channels[]": 4, + "ListPeers.peers[].connected": 2, + "ListPeers.peers[].features": 6, + "ListPeers.peers[].id": 1, + "ListPeers.peers[].log[]": 3, + "ListPeers.peers[].netaddr[]": 5, + "ListPeers.peers[].remote_addr": 7 + }, + "ListpeersPeersChannels": { + "ListPeers.peers[].channels[].alias": 50, + "ListPeers.peers[].channels[].channel_id": 6, + "ListPeers.peers[].channels[].close_to": 14, + "ListPeers.peers[].channels[].close_to_addr": 47, + "ListPeers.peers[].channels[].closer": 17, + "ListPeers.peers[].channels[].dust_limit_msat": 26, + "ListPeers.peers[].channels[].features[]": 18, + "ListPeers.peers[].channels[].fee_base_msat": 24, + "ListPeers.peers[].channels[].fee_proportional_millionths": 25, + "ListPeers.peers[].channels[].feerate": 3, + "ListPeers.peers[].channels[].funding": 19, + "ListPeers.peers[].channels[].funding_outnum": 8, + "ListPeers.peers[].channels[].funding_txid": 7, + "ListPeers.peers[].channels[].htlcs[]": 46, + "ListPeers.peers[].channels[].in_fulfilled_msat": 41, + "ListPeers.peers[].channels[].in_offered_msat": 39, + "ListPeers.peers[].channels[].in_payments_fulfilled": 40, + "ListPeers.peers[].channels[].in_payments_offered": 38, + "ListPeers.peers[].channels[].inflight[]": 13, + "ListPeers.peers[].channels[].initial_feerate": 9, + "ListPeers.peers[].channels[].last_feerate": 10, + "ListPeers.peers[].channels[].max_accepted_htlcs": 35, + "ListPeers.peers[].channels[].max_to_us_msat": 22, + "ListPeers.peers[].channels[].max_total_htlc_in_msat": 27, + "ListPeers.peers[].channels[].maximum_htlc_out_msat": 49, + "ListPeers.peers[].channels[].min_to_us_msat": 21, + "ListPeers.peers[].channels[].minimum_htlc_in_msat": 32, + "ListPeers.peers[].channels[].minimum_htlc_out_msat": 48, + "ListPeers.peers[].channels[].next_fee_step": 12, + "ListPeers.peers[].channels[].next_feerate": 11, + "ListPeers.peers[].channels[].opener": 16, + "ListPeers.peers[].channels[].our_reserve_msat": 29, + "ListPeers.peers[].channels[].our_to_self_delay": 34, + "ListPeers.peers[].channels[].out_fulfilled_msat": 45, + "ListPeers.peers[].channels[].out_offered_msat": 43, + "ListPeers.peers[].channels[].out_payments_fulfilled": 44, + "ListPeers.peers[].channels[].out_payments_offered": 42, + "ListPeers.peers[].channels[].owner": 4, + "ListPeers.peers[].channels[].private": 15, + "ListPeers.peers[].channels[].receivable_msat": 31, + "ListPeers.peers[].channels[].scratch_txid": 2, + "ListPeers.peers[].channels[].short_channel_id": 5, + "ListPeers.peers[].channels[].spendable_msat": 30, + "ListPeers.peers[].channels[].state": 1, + "ListPeers.peers[].channels[].state_changes[]": 36, + "ListPeers.peers[].channels[].status[]": 37, + "ListPeers.peers[].channels[].their_reserve_msat": 28, + "ListPeers.peers[].channels[].their_to_self_delay": 33, + "ListPeers.peers[].channels[].to_us_msat": 20, + "ListPeers.peers[].channels[].total_msat": 23 + }, + "ListpeersPeersChannelsAlias": { + "ListPeers.peers[].channels[].alias.local": 1, + "ListPeers.peers[].channels[].alias.remote": 2 + }, + "ListpeersPeersChannelsFeerate": { + "ListPeers.peers[].channels[].feerate.perkb": 2, + "ListPeers.peers[].channels[].feerate.perkw": 1 + }, + "ListpeersPeersChannelsFunding": { + "ListPeers.peers[].channels[].funding.fee_paid_msat": 5, + "ListPeers.peers[].channels[].funding.fee_rcvd_msat": 6, + "ListPeers.peers[].channels[].funding.local_funds_msat": 4, + "ListPeers.peers[].channels[].funding.local_msat": 1, + "ListPeers.peers[].channels[].funding.pushed_msat": 3, + "ListPeers.peers[].channels[].funding.remote_funds_msat": 7, + "ListPeers.peers[].channels[].funding.remote_msat": 2 + }, + "ListpeersPeersChannelsHtlcs": { + "ListPeers.peers[].channels[].htlcs[].amount_msat": 3, + "ListPeers.peers[].channels[].htlcs[].direction": 1, + "ListPeers.peers[].channels[].htlcs[].expiry": 4, + "ListPeers.peers[].channels[].htlcs[].id": 2, + "ListPeers.peers[].channels[].htlcs[].local_trimmed": 6, + "ListPeers.peers[].channels[].htlcs[].payment_hash": 5, + "ListPeers.peers[].channels[].htlcs[].state": 8, + "ListPeers.peers[].channels[].htlcs[].status": 7 + }, + "ListpeersPeersChannelsInflight": { + "ListPeers.peers[].channels[].inflight[].feerate": 3, + "ListPeers.peers[].channels[].inflight[].funding_outnum": 2, + "ListPeers.peers[].channels[].inflight[].funding_txid": 1, + "ListPeers.peers[].channels[].inflight[].our_funding_msat": 5, + "ListPeers.peers[].channels[].inflight[].scratch_txid": 6, + "ListPeers.peers[].channels[].inflight[].total_funding_msat": 4 + }, + "ListpeersPeersLog": { + "ListPeers.peers[].log[].data": 7, + "ListPeers.peers[].log[].log": 5, + "ListPeers.peers[].log[].node_id": 6, + "ListPeers.peers[].log[].num_skipped": 2, + "ListPeers.peers[].log[].source": 4, + "ListPeers.peers[].log[].time": 3, + "ListPeers.peers[].log[].type": 1 + }, + "ListpeersRequest": { + "ListPeers.id": 1, + "ListPeers.level": 2 + }, + "ListpeersResponse": { + "ListPeers.peers[]": 1 + }, + "ListsendpaysPayments": { + "ListSendPays.payments[].amount_msat": 5, + "ListSendPays.payments[].amount_sent_msat": 8, + "ListSendPays.payments[].bolt11": 10, + "ListSendPays.payments[].bolt12": 11, + "ListSendPays.payments[].created_at": 7, + "ListSendPays.payments[].description": 14, + "ListSendPays.payments[].destination": 6, + "ListSendPays.payments[].erroronion": 13, + "ListSendPays.payments[].groupid": 2, + "ListSendPays.payments[].id": 1, + "ListSendPays.payments[].label": 9, + "ListSendPays.payments[].payment_hash": 3, + "ListSendPays.payments[].payment_preimage": 12, + "ListSendPays.payments[].status": 4 + }, + "ListsendpaysRequest": { + "ListSendPays.bolt11": 1, + "ListSendPays.payment_hash": 2, + "ListSendPays.status": 3 + }, + "ListsendpaysResponse": { + "ListSendPays.payments[]": 1 + }, + "ListtransactionsResponse": { + "ListTransactions.transactions[]": 1 + }, + "ListtransactionsTransactions": { + "ListTransactions.transactions[].blockheight": 3, + "ListTransactions.transactions[].channel": 6, + "ListTransactions.transactions[].hash": 1, + "ListTransactions.transactions[].inputs[]": 9, + "ListTransactions.transactions[].locktime": 7, + "ListTransactions.transactions[].outputs[]": 10, + "ListTransactions.transactions[].rawtx": 2, + "ListTransactions.transactions[].txindex": 4, + "ListTransactions.transactions[].type[]": 5, + "ListTransactions.transactions[].version": 8 + }, + "ListtransactionsTransactionsInputs": { + "ListTransactions.transactions[].inputs[].channel": 5, + "ListTransactions.transactions[].inputs[].index": 2, + "ListTransactions.transactions[].inputs[].sequence": 3, + "ListTransactions.transactions[].inputs[].txid": 1, + "ListTransactions.transactions[].inputs[].type": 4 + }, + "ListtransactionsTransactionsOutputs": { + "ListTransactions.transactions[].outputs[].amount_msat": 6, + "ListTransactions.transactions[].outputs[].channel": 5, + "ListTransactions.transactions[].outputs[].index": 1, + "ListTransactions.transactions[].outputs[].msat": 2, + "ListTransactions.transactions[].outputs[].scriptPubKey": 3, + "ListTransactions.transactions[].outputs[].type": 4 + }, + "NewaddrRequest": { + "NewAddr.addresstype": 1 + }, + "NewaddrResponse": { + "NewAddr.bech32": 1, + "NewAddr.p2sh-segwit": 2 + }, + "PayRequest": { + "Pay.amount_msat": 13, + "Pay.bolt11": 1, + "Pay.description": 12, + "Pay.exclude": 10, + "Pay.exemptfee": 7, + "Pay.label": 3, + "Pay.localofferid": 9, + "Pay.maxdelay": 6, + "Pay.maxfee": 11, + "Pay.maxfeepercent": 4, + "Pay.msatoshi": 2, + "Pay.retry_for": 5, + "Pay.riskfactor": 8 + }, + "PayResponse": { + "Pay.amount_msat": 6, + "Pay.amount_sent_msat": 7, + "Pay.created_at": 4, + "Pay.destination": 2, + "Pay.parts": 5, + "Pay.payment_hash": 3, + "Pay.payment_preimage": 1, + "Pay.status": 9, + "Pay.warning_partial_completion": 8 + }, + "PingRequest": { + "Ping.id": 1, + "Ping.len": 2, + "Ping.pongbytes": 3 + }, + "PingResponse": { + "Ping.totlen": 1 + }, + "SendonionFirst_hop": { + "SendOnion.first_hop.amount_msat": 2, + "SendOnion.first_hop.delay": 3, + "SendOnion.first_hop.id": 1 + }, + "SendonionRequest": { + "SendOnion.amount_msat": 12, + "SendOnion.bolt11": 7, + "SendOnion.destination": 9, + "SendOnion.first_hop": 2, + "SendOnion.groupid": 11, + "SendOnion.label": 4, + "SendOnion.localofferid": 10, + "SendOnion.msatoshi": 8, + "SendOnion.onion": 1, + "SendOnion.partid": 6, + "SendOnion.payment_hash": 3, + "SendOnion.shared_secrets[]": 5 + }, + "SendonionResponse": { + "SendOnion.amount_msat": 4, + "SendOnion.amount_sent_msat": 7, + "SendOnion.bolt11": 9, + "SendOnion.bolt12": 10, + "SendOnion.created_at": 6, + "SendOnion.destination": 5, + "SendOnion.id": 1, + "SendOnion.label": 8, + "SendOnion.message": 12, + "SendOnion.partid": 13, + "SendOnion.payment_hash": 2, + "SendOnion.payment_preimage": 11, + "SendOnion.status": 3 + }, + "SendpayRequest": { + "SendPay.amount_msat": 10, + "SendPay.bolt11": 5, + "SendPay.groupid": 9, + "SendPay.label": 3, + "SendPay.localofferid": 8, + "SendPay.msatoshi": 4, + "SendPay.partid": 7, + "SendPay.payment_hash": 2, + "SendPay.payment_secret": 6, + "SendPay.route[]": 1 + }, + "SendpayResponse": { + "SendPay.amount_msat": 5, + "SendPay.amount_sent_msat": 8, + "SendPay.bolt11": 11, + "SendPay.bolt12": 12, + "SendPay.completed_at": 15, + "SendPay.created_at": 7, + "SendPay.destination": 6, + "SendPay.groupid": 2, + "SendPay.id": 1, + "SendPay.label": 9, + "SendPay.message": 14, + "SendPay.partid": 10, + "SendPay.payment_hash": 3, + "SendPay.payment_preimage": 13, + "SendPay.status": 4 + }, + "SendpayRoute": { + "SendPay.route[].amount_msat": 5, + "SendPay.route[].channel": 4, + "SendPay.route[].delay": 3, + "SendPay.route[].id": 2, + "SendPay.route[].msatoshi": 1 + }, + "SendpsbtRequest": { + "SendPsbt.psbt": 1, + "SendPsbt.reserve": 2 + }, + "SendpsbtResponse": { + "SendPsbt.tx": 1, + "SendPsbt.txid": 2 + }, + "SetchannelChannels": { + "SetChannel.channels[].channel_id": 2, + "SetChannel.channels[].fee_base_msat": 4, + "SetChannel.channels[].fee_proportional_millionths": 5, + "SetChannel.channels[].maximum_htlc_out_msat": 8, + "SetChannel.channels[].minimum_htlc_out_msat": 6, + "SetChannel.channels[].peer_id": 1, + "SetChannel.channels[].short_channel_id": 3, + "SetChannel.channels[].warning_htlcmax_too_high": 9, + "SetChannel.channels[].warning_htlcmin_too_low": 7 + }, + "SetchannelRequest": { + "SetChannel.enforcedelay": 6, + "SetChannel.feebase": 2, + "SetChannel.feeppm": 3, + "SetChannel.htlcmax": 5, + "SetChannel.htlcmin": 4, + "SetChannel.id": 1 + }, + "SetchannelResponse": { + "SetChannel.channels[]": 1 + }, + "SignmessageRequest": { + "SignMessage.message": 1 + }, + "SignmessageResponse": { + "SignMessage.recid": 2, + "SignMessage.signature": 1, + "SignMessage.zbase": 3 + }, + "SignpsbtRequest": { + "SignPsbt.psbt": 1, + "SignPsbt.signonly[]": 2 + }, + "SignpsbtResponse": { + "SignPsbt.signed_psbt": 1 + }, + "TxdiscardRequest": { + "TxDiscard.txid": 1 + }, + "TxdiscardResponse": { + "TxDiscard.txid": 2, + "TxDiscard.unsigned_tx": 1 + }, + "TxprepareRequest": { + "TxPrepare.feerate": 2, + "TxPrepare.minconf": 3, + "TxPrepare.outptus[]": 1, + "TxPrepare.outputs[]": 5, + "TxPrepare.utxos[]": 4 + }, + "TxprepareResponse": { + "TxPrepare.psbt": 1, + "TxPrepare.txid": 3, + "TxPrepare.unsigned_tx": 2 + }, + "TxsendRequest": { + "TxSend.txid": 1 + }, + "TxsendResponse": { + "TxSend.psbt": 1, + "TxSend.tx": 2, + "TxSend.txid": 3 + }, + "UtxopsbtRequest": { + "UtxoPsbt.excess_as_change": 9, + "UtxoPsbt.feerate": 2, + "UtxoPsbt.locktime": 6, + "UtxoPsbt.min_witness_weight": 7, + "UtxoPsbt.reserve": 5, + "UtxoPsbt.reservedok": 8, + "UtxoPsbt.satoshi": 1, + "UtxoPsbt.startweight": 3, + "UtxoPsbt.utxos[]": 4 + }, + "UtxopsbtReservations": { + "UtxoPsbt.reservations[].reserved": 4, + "UtxoPsbt.reservations[].reserved_to_block": 5, + "UtxoPsbt.reservations[].txid": 1, + "UtxoPsbt.reservations[].vout": 2, + "UtxoPsbt.reservations[].was_reserved": 3 + }, + "UtxopsbtResponse": { + "UtxoPsbt.change_outnum": 5, + "UtxoPsbt.estimated_final_weight": 3, + "UtxoPsbt.excess_msat": 4, + "UtxoPsbt.feerate_per_kw": 2, + "UtxoPsbt.psbt": 1, + "UtxoPsbt.reservations[]": 6 + }, + "WaitanyinvoiceRequest": { + "WaitAnyInvoice.lastpay_index": 1, + "WaitAnyInvoice.timeout": 2 + }, + "WaitanyinvoiceResponse": { + "WaitAnyInvoice.amount_msat": 6, + "WaitAnyInvoice.amount_received_msat": 10, + "WaitAnyInvoice.bolt11": 7, + "WaitAnyInvoice.bolt12": 8, + "WaitAnyInvoice.description": 2, + "WaitAnyInvoice.expires_at": 5, + "WaitAnyInvoice.label": 1, + "WaitAnyInvoice.paid_at": 11, + "WaitAnyInvoice.pay_index": 9, + "WaitAnyInvoice.payment_hash": 3, + "WaitAnyInvoice.payment_preimage": 12, + "WaitAnyInvoice.status": 4 + }, + "WaitinvoiceRequest": { + "WaitInvoice.label": 1 + }, + "WaitinvoiceResponse": { + "WaitInvoice.amount_msat": 6, + "WaitInvoice.amount_received_msat": 10, + "WaitInvoice.bolt11": 7, + "WaitInvoice.bolt12": 8, + "WaitInvoice.description": 2, + "WaitInvoice.expires_at": 5, + "WaitInvoice.label": 1, + "WaitInvoice.paid_at": 11, + "WaitInvoice.pay_index": 9, + "WaitInvoice.payment_hash": 3, + "WaitInvoice.payment_preimage": 12, + "WaitInvoice.status": 4 + }, + "WaitsendpayRequest": { + "WaitSendPay.groupid": 4, + "WaitSendPay.partid": 2, + "WaitSendPay.payment_hash": 1, + "WaitSendPay.timeout": 3 + }, + "WaitsendpayResponse": { + "WaitSendPay.amount_msat": 5, + "WaitSendPay.amount_sent_msat": 8, + "WaitSendPay.bolt11": 11, + "WaitSendPay.bolt12": 12, + "WaitSendPay.completed_at": 14, + "WaitSendPay.created_at": 7, + "WaitSendPay.destination": 6, + "WaitSendPay.groupid": 2, + "WaitSendPay.id": 1, + "WaitSendPay.label": 9, + "WaitSendPay.partid": 10, + "WaitSendPay.payment_hash": 3, + "WaitSendPay.payment_preimage": 13, + "WaitSendPay.status": 4 + }, + "WithdrawRequest": { + "Withdraw.destination": 1, + "Withdraw.feerate": 5, + "Withdraw.minconf": 3, + "Withdraw.satoshi": 2, + "Withdraw.utxos[]": 4 + }, + "WithdrawResponse": { + "Withdraw.psbt": 3, + "Withdraw.tx": 1, + "Withdraw.txid": 2 + } + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a5d3d6c7294..486ce6457620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,354 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [0.12.0] - 2022-08-23: Web-8 init + +This release named by @adi2011. + +Developers please note the Great Msat Migration has begun: +1. All JSON amount field names now end in "_msat" (others are deprecated) +2. Their values are strings ending in "msat", but will soon be normal integers. +3. You should accept both: set `allow-deprecated-apis=false` to test! + +### Added + + - *NEW*: `commando` a new builtin plugin to send/recv peer commands over the lightning network, using runes. ([#5370]) + - *NEW*: New built-in plugin `bookkeeper` w/ commands `bkpr-listaccountevents`, `bkpr-listbalances`, `bkpr-listincome`, `bkpr-channelsapy`, `bkpr-dumpincomecsv`, `bkpr-inspect` ([#5071]) + - *NEW*: Emergency channel backup ("static backup") which allows us to seek fund recovery from honest peers in case of complete data loss ([#5422]) + - Config: `log-level=debug:` supported to get debug-level logs for everything about a peer. ([#5349]) + - JSON-RPC: `connect` use the standard port derivation when the port is not specified. ([#5242]) + - JSON-RPC: `fetchinvoice` `changes` `amount_msat` ([#5306]) + - JSON-RPC: Added `mindepth` argument to specify the number of confirmations we require for `fundchannel` and `multifundchannel` ([#5275]) + - JSON-RPC: `listpeers` new fields for `funding` (`remote_funds_msat`, `local_funds_msat`, `fee_paid_msat`, `fee_rcvd_msat`). ([#5477]) + - JSON-RPC: `listpeers` add optional `remote_addr` ([#5244]) + - JSON-RPC: `listforwards` now shows `out_channel` in more cases: even if it couldn't actually send to it. ([#5330]) + - JSON-RPC: `pay` `attempts` `amount_msat` field. ([#5306]) + - Protocol: private channels will only route using short-channel-ids if channel opened with option_scid_alias-supporting peer. ([#5501]) + - Protocol: invoice routehints will use fake short-channel-ids for private channels if channel opened with option_scid_alias-supporting peer. ([#5501]) + - Protocol: we now advertize the `option_channel_type` feature (which we actually supported since v0.10.2) ([#5455]) + - Plugins: `channel_state_changed` now triggers for a v1 channel's initial "CHANNELD_AWAITING_LOCKIN" state transition (from prior state "unknown") ([#5381]) + - Plugins: `htlc_accepted_hook` `amount_msat` field. ([#5306]) + - Plugins: `htlc_accepted` now exposes the `short_channel_id` for the channel from which that HTLC is coming from and the low-level per-channel HTLC `id`, which are necessary for bridging two different Lightning Networks when MPP is involved. ([#5303]) + - Plugins: The `openchannel` hook may return a `mindepth` indicating how many confirmations are required. ([#5275]) + - msggen: introduce chain of responsibility pattern to make msggen extensible ([#5216]) + - cln_plugin: persist cln configuration from init msg ([#5279]) + - pyln-testing: Added utilities to read and parse `gossip_store` file for nodes. ([#5275]) + - `hsmtool`: new command `checkhsm` to check BIP39 passphrase against hsm_secret. ([#5441]) + - contrib: Added `fund_ln` to the contrib/startup\_regtest.sh ([#5062]) + - build: Added m1 architecture support for macos ([#4988]) + - build: Reproducible builds now include rust binaries such as the `cln-grpc` plugin ([#5421]) + + +### Changed + + - `lightningd`: will refuse to start with the wrong node_id (i.e. hsm_secret changes). ([#5425]) + - `connectd`: prefer IPv6 connections when available. ([#5244]) + - `connectd`: Only use IP discovery as fallback when no addresses would be announced ([#5344]) + - `connectd`: give busy peers more time to respond to pings. ([#5347]) + - `gossipd`: now accepts spam gossip, but squelches it for ([#5239]) + - gossip: gossip\_store updated to version 10. ([#5239]) + - Options: `log-file` option specified multiple times opens multiple log files. ([#5281]) + - JSON-RPC: `sendpay` and `sendonion` now obey the first hop "channel" short_channel_id, if specified. ([#5505]) + - JSON-RPC: `signpsbt` no longer crashes if it doesn't like what your PSBT is ([#5506]) + - JSON-RPC: `signpsbt` will now add redeemscript + witness-utxo to the PSBT for an input that we can sign for, before signing it. ([#5506]) + - JSON-RPC: `plugin start` now assumes relative path to default plugins dir if the path is not found in absolute context. i.e. lightning-cli plugin start my_plugin.py ([#5211]) + - JSON-RPC: `fundchannel`: now errors if you try to buy a liquidity ad but dont' have `experimental-dual-fund` enabled ([#5389]) + - JSON-RPC: "\_msat" fields can be raw numbers, not "123msat" strings (please handle both!) ([#5306]) + - JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice`: `msatoshi` argument is now called `amount_msat` to match other fields. ([#5306]) + + +### Deprecated + +Note: You should always set `allow-deprecated-apis=false` to test for changes. + + - JSON-RPC: `listpeers`.`funded` fields `local_msat` and `remote_msat`. ([#5477]) + - JSON-RPC: `listtransactions` `msat` (use `amount_msat`) ([#5306]) + - JSON-RPC: checkmessage return an error when the pubkey is not specified and it is unknown in the network graph. ([#5252]) + - JSON-RPC: "_msat" fields as "123msat" strings (will be only numbers) ([#5306]) + - JSON-RPC: `sendpay` `route` elements `msatoshi` (use `amount_msat`) ([#5306]) + - JSON-RPC: `pay`, `decode`, `decodepay`, `getroute`, `listinvoices`, `listpays` and `listsendpays` `msatoshi` fields (use `amount_msat`). ([#5306]) + - JSON-RPC: `getinfo` `msatoshi_fees_collected` field (use `fees_collected_msat`). ([#5306]) + - JSON-RPC: `listpeers` `channels`: `msatoshi_to_us`, `msatoshi_to_us_min`, `msatoshi_to_us_max`, `msatoshi_total`, `dust_limit_satoshis`, `our_channel_reserve_satoshis`, `their_channel_reserve_satoshis`, `spendable_msatoshi`, `receivable_msatoshi`, `in_msatoshi_offered`, `in_msatoshi_fulfilled`, `out_msatoshi_offered`, `out_msatoshi_fulfilled`, `max_htlc_value_in_flight_msat` and `htlc_minimum_msat` (use `to_us_msat`, `min_to_us_msat`, `max_to_us_msat`, `total_msat`, `dust_limit_msat`, `our_reserve_msat`, `their_reserve_msat`, `spendable_msat`, `receivable_msat`, `in_offered_msat`, `in_fulfilled_msat`, `out_offered_msat`, `out_fulfilled_msat`, `max_total_htlc_in_msat` and `minimum_htlc_in_msat`). ([#5306]) + - JSON-RPC: `listinvoices` and `pay` `msatoshi_received` and `msatoshi_sent` (use `amount_received_msat`, `amount_sent_msat`) ([#5306]) + - JSON-RPC: `listpays` and `listsendpays` `msatoshi_sent` (use `amount_sent_msat`) ([#5306]) + - JSON-RPC: `listforwards` `in_msatoshi`, `out_msatoshi` and `fee` (use `in_msat`, `out_msat` and `fee_msat`) ([#5306]) + - JSON-RPC: `listfunds` `outputs` `value` (use `amount_msat`) ([#5306]) + - JSON-RPC: `fetchinvoice` `changes` `msat` (use `amount_msat`) ([#5306]) + - JSON-RPC: `pay` `attempts` `amount` field (use `amount_msat`). ([#5306]) + - JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice` `msatoshi` (use `amount_msat`) ([#5306]) + - `listconfigs` `plugins` `options` which are not set are omitted, not `null`. ([#5306]) + - Plugins: `htlc_accepted_hook` `amount` field (use `amount_msat`) ([#5306]) + - Plugins: `coin_movement` notification: `balance`, `credit`, `debit` and `fees` (use `balance_msat`, `credit_msat`, `debit_msat` and `fees_msat`) ([#5306]) + - Plugins: `rbf_channel` and `openchannel2` hooks `their_funding` (use `their_funding_msat`) ([#5306]) + - Plugins: `openchannel2` hook `dust_limit_satoshis` (use `dust_limit_msat`) ([#5306]) + - Plugins: `openchannel` hook `funding_satoshis` (use `funding_msat`) ([#5306]) + - Plugins: `openchannel` hook `dust_limit_satoshis` (use `dust_limit_msat`) ([#5306]) + - Plugins: `openchannel` hook `channel_reserve_satoshis` (use `channel_reserve_msat`) ([#5306]) + - Plugins: `channel_opened` notification `amount` (use `funding_msat`) ([#5306]) + - Plugins: `htlc_accepted` `forward_amount` (use `forward_msat`) ([#5306]) + + +### Removed + + - Protocol: We no longer create gossip messages which use zlib encoding (we still understand them, for now!) ([#5226]) + - JSON-RPC: `getsharedsecret` API: use `makesecret` ([#5430]) + - JSON-RPC: removed `listtransactions` `outputs` `satoshis` field (deprecated v0.10.1) ([#5264]) + - JSON-RPC: removed `listpeers` `channels` deprecated fields (deprecated v0.10.1) ([#5264]) + - JSON-RPC: removed `listpeers` `channels` `closer` now omitted, rather than `null` (deprecated v0.10.1) ([#5264]) + - libhsmd: Removed the `libhsmd_python` wrapper as it was unused ([#5415]) + - Options: removed `enable-autotor-v2-mode` option (deprecated v0.10.1) ([#5264]) + + +### Fixed + + - db: postgresql crash on startup when dual-funding lease open is pending with "s32 field doesn't match size: expected 4, actual 8" ([#5513]) + - `connectd`: various crashes and issues fixed by simplification and rewrite. ([#5261]) + - `connectd`: Port of a DNS announcement can be 0 if unspecified ([#5434]) + - `dualopend`: Issue if the number of outputs decreases in a dualopen RBF or splice. ([#5378]) + - `channeld`: Enforce our own `minimum_depth` beyond just confirming ([#5275]) + - logging: `log-prefix` now correctly prefixes *all* log messages. ([#5349]) + - logging: `log-level` `io` shows JSONRPC output, as well as input. ([#5306]) + - PSBT: Fix signature encoding to comply with BIP-0171. ([#5307]) + - signmessage: improve the UX of the rpc command when zbase is not a valid one ([#5297]) + - JSON-RPC: Adds dynamically detected public IP addresses to `getinfo` ([#5244]) + - cln-rpc: naming mismatch for `ConnectPeer` causing `connectpeer` to be called on the JSON-RPC ([#5362]) + - pyln-spec: update the bolts implementation ([#5168]) + - Plugins: setting the default value of a parameter to `null` is the same as not setting it (pyln plugins did this!). ([#5460]) + - Plugins: plugins would hang indefinitely despite `lightningd` closing the connection ([#5362]) + - Plugins: `channel_opened` notification `funding_locked` field is now accurate: was always `true`. ([#5489]) + - Upgrade docker base image from Debian buster to bullseye to work with glibc 2.29+ #5276 ([#5278]) + - docker: The docker images are now built with the rust plugins `cln-grpc` ([#5270]) + +[#4988]: https://github.com/ElementsProject/lightning/pull/4988 +[#5062]: https://github.com/ElementsProject/lightning/pull/5062 +[#5071]: https://github.com/ElementsProject/lightning/pull/5071 +[#5168]: https://github.com/ElementsProject/lightning/pull/5168 +[#5211]: https://github.com/ElementsProject/lightning/pull/5211 +[#5216]: https://github.com/ElementsProject/lightning/pull/5216 +[#5226]: https://github.com/ElementsProject/lightning/pull/5226 +[#5239]: https://github.com/ElementsProject/lightning/pull/5239 +[#5242]: https://github.com/ElementsProject/lightning/pull/5242 +[#5244]: https://github.com/ElementsProject/lightning/pull/5244 +[#5252]: https://github.com/ElementsProject/lightning/pull/5252 +[#5261]: https://github.com/ElementsProject/lightning/pull/5261 +[#5264]: https://github.com/ElementsProject/lightning/pull/5264 +[#5270]: https://github.com/ElementsProject/lightning/pull/5270 +[#5275]: https://github.com/ElementsProject/lightning/pull/5275 +[#5278]: https://github.com/ElementsProject/lightning/pull/5278 +[#5279]: https://github.com/ElementsProject/lightning/pull/5279 +[#5281]: https://github.com/ElementsProject/lightning/pull/5281 +[#5297]: https://github.com/ElementsProject/lightning/pull/5297 +[#5303]: https://github.com/ElementsProject/lightning/pull/5303 +[#5306]: https://github.com/ElementsProject/lightning/pull/5306 +[#5307]: https://github.com/ElementsProject/lightning/pull/5307 +[#5330]: https://github.com/ElementsProject/lightning/pull/5330 +[#5344]: https://github.com/ElementsProject/lightning/pull/5344 +[#5347]: https://github.com/ElementsProject/lightning/pull/5347 +[#5349]: https://github.com/ElementsProject/lightning/pull/5349 +[#5362]: https://github.com/ElementsProject/lightning/pull/5362 +[#5370]: https://github.com/ElementsProject/lightning/pull/5370 +[#5378]: https://github.com/ElementsProject/lightning/pull/5378 +[#5381]: https://github.com/ElementsProject/lightning/pull/5381 +[#5389]: https://github.com/ElementsProject/lightning/pull/5389 +[#5415]: https://github.com/ElementsProject/lightning/pull/5415 +[#5421]: https://github.com/ElementsProject/lightning/pull/5421 +[#5422]: https://github.com/ElementsProject/lightning/pull/5422 +[#5425]: https://github.com/ElementsProject/lightning/pull/5425 +[#5430]: https://github.com/ElementsProject/lightning/pull/5430 +[#5434]: https://github.com/ElementsProject/lightning/pull/5434 +[#5441]: https://github.com/ElementsProject/lightning/pull/5441 +[#5455]: https://github.com/ElementsProject/lightning/pull/5455 +[#5460]: https://github.com/ElementsProject/lightning/pull/5460 +[#5475]: https://github.com/ElementsProject/lightning/pull/5475 +[#5477]: https://github.com/ElementsProject/lightning/pull/5477 +[#5489]: https://github.com/ElementsProject/lightning/pull/5489 +[#5501]: https://github.com/ElementsProject/lightning/pull/5501 +[#5505]: https://github.com/ElementsProject/lightning/pull/5505 +[#5506]: https://github.com/ElementsProject/lightning/pull/5506 +[#5513]: https://github.com/ElementsProject/lightning/pull/5513 + + + +## [0.11.2] - 2022-06-24: Simon's Carefully Chosen Release Name III + +Regressions since 0.10.2 which could not wait for the 0.12 release, +which especially hurt larger nodes. + +### Fixed + + - Protocol: treat LND "internal error" as warnings, not force close events (like v0.10) ([#5326]) + - connectd: no longer occasional crashes when peers reconnect. ([#5300]) + - connectd: another crash fix on trying to reconnect to disconnecting peer. ([#5340]) + - topology: Under some circumstances we were considering the limits on the wrong direction for a channel ([#5286]) + - routing: Fixed an issue where we would exclude the entire channel if either direction was disabled, or we hadn't seen an update yet. ([#5286]) + - connectd: large memory usage with many peers fixed. ([#5312]) + - connectd: reduce initial CPU load when connecting to peers. ([#5328]) + - lightnind: fix failed startup "Could not load channels from the database" if old TORv2 addresses were present. ([#5331]) + +[#5286]: https://github.com/ElementsProject/lightning/pull/5286 +[#5300]: https://github.com/ElementsProject/lightning/pull/5300 +[#5312]: https://github.com/ElementsProject/lightning/pull/5312 +[#5326]: https://github.com/ElementsProject/lightning/pull/5326 +[#5328]: https://github.com/ElementsProject/lightning/pull/5328 +[#5331]: https://github.com/ElementsProject/lightning/pull/5331 +[#5340]: https://github.com/ElementsProject/lightning/pull/5340 +[0.11.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.2 + +## [0.11.1] - 2022-05-13: Simon's Carefully Chosen Release Name II + +Single change which fixed a bug introduced in 0.11.0 which could cause +unwanted unilateral closes (`bad reestablish revocation_number: 0 vs 3`) + +### Fixed + + - connectd: make sure we don't keep stale reconnections around. ([#5256]) + - connectd: fix assert which we could trigger. ([#5256]) + +[#5256]: https://github.com/ElementsProject/lightning/pull/5256 + +## [0.11.0.1] - 2022-04-04: Simon's Carefully Chosen Release Name + +This release would have been named by Simon Vrouwe, had he responded to my emails! + +This marks the name change to core-lightning (#CLN). + +### Added + + - Protocol: we now support opening multiple channels with the same peer. ([#5078]) + - Protocol: we send/receive IP addresses in `init`, and send updated node_announcement when two peers report the same remote_addr (`disable-ip-discovery` suppresses this announcement). ([#5052]) + - Protocol: we more aggressively send our own gossip, to improve propagation chances. ([#5200]) + - Plugins: `cln-grpc` first class GRPC interface for remotely controlling nodes over mTLS authentication; set `grpc-port` to activate ([#5013]) + - Database: With the `sqlite3://` scheme for `--wallet` option, you can now specify a second file path for real-time database backup by separating it from the main file path with a `:` character. ([#4890]) + - Protocol: `pay` (and decode, etc) supports bolt11 payment_metadata a-la https://github.com/lightning/bolts/pull/912 ([#5086]) + - JSON-RPC: `invoice` has a new parameter `deschashonly` to put hash of description in bolt11. ([#5121]) + - JSON-RPC: `pay` has new parameter `description`, will be required if bolt11 only has a hash. ([#5122]) + - JSON-RPC: `pay` has new parameter `maxfee` for setting absolute fee (instead of using `maxfeepercent` and/or `exemptfee`) ([#5122]) + - JSON-RPC: `listforwards` has new entry `style`, currently "legacy" or "tlv". ([#5146]) + - JSON-RPC: `delinvoice` has a new parameter `desconly` to remove description. ([#5121]) + - JSON-RPC: new `setchannel` command generalizes `setchannelfee`: you can now alter the `htlc_minimum_msat` and `htlc_maximum_msat` your node advertizes. ([#5103]) + - Config: `htlc-minimum-msat` and `htlc-maximum-msat` to set default values to advertizes for new channels. ([#5136]) + - JSON-RPC: `listpeers` now includes a `pushed_msat` value. For leased channels, is the total lease_fee. ([#5043]) + - JSON-RPC: `getinfo` result now includes `our_features` (bits) for various Bolt #9 contexts ([#5047]) + - Docker build for ARM defaults to `bitcoin`, but can be overridden with the `LIGHTNINGD_NETWORK` envvar. ([#4896]) + - Developer: A new Rust library called `cln-rpc` can be used to interact with the JSON-RPC ([#5010]) + - JSON-RPC: A new `msggen` library allows easy generation of language bindings for the JSON-RPC from the JSON schemas ([#5010]) + - JSON-RPC: `listchannels` now includes the `funding_outnum` ([#5016]) + - JSON-RPC: `coin_movement` to 'external' accounts now include an 'originating_account' field ([#5019]) + - JSON-RPC: Add `exclude` option for `pay` command to manually exclude channels or nodes when finding a route. ([#4906]) + - Database: Speed up loading of pending HTLCs during startup by using a partial index. ([#4925]) + + +### Changed + + - JSON-RPC: `close` by peer id will fail if there is more than one live channel (use `channel_id` or `short_channel_id` as id arg). ([#5078]) + - JSON_RPC: `sendcustommsg` now works with any connected peer, even when shutting down a channel. ([#4985]) + - JSON_RPC: `ping` now works with connected peers, even without a channel. ([#4985]) + - cli: Addition of HSM specific error code in lightning-cli ([#4908]) + - config: If the port is unspecified, the default port is chosen according to used network similarly to Bitcoin Core. ([#4900]) + - Plugins: `shutdown` notification is now send when lightningd is almost completely shutdown, RPC calls then fail with error code -5. ([#4897]) + - Protocol: `signet` addresses and invoices now use `tbs` instead of `tb`. ([#4929]) + + +### Deprecated + +Note: You should always set `allow-deprecated-apis=false` to test for changes. + + - JSON-RPC: `pay` for a bolt11 which uses a `description_hash`, without setting `description`. ([#5122]) + - JSON-RPC: `invoice` `expiry` no longer allowed to be a string with suffix, use an integer number of seconds. ([#5104]) + - JSON-RPC: `fundpsbt`/`utxopsbt` `reserve` must be a number, not bool (for `true` use 72/don't specify, for `false` use 0). Numbers have been allowed since v0.10.1. ([#5104]) + - JSON-RPC: `shutdown` no longer allows p2pkh or p2sh addresses. ([#5086]) + - JSON-RPC: `sendpay` `route` argument `style` "legacy" (don't use it at all, we ignore it now and always use "tlv" anyway). ([#5120]) + - JSON-RPC: `setchannelfee` (use `setchannel`). ([#5103]) + + +### Removed + + - JSON-RPC: `legacypay` (`pay` replaced it in 0.9.0). ([#5122]) + - Protocol: support for legacy onion format removed, since everyone supports the new one. ([#5058]) + - Protocol: ... but we still forward legacy HTLC onions for now. ([#5146]) + - Plugins: The `message` field on the `custommsg` hook (deprecated in v0.10.0) ([#4902]) + - JSON-RPC: `fundchannel_complete` `txid` and `txout` parameters (deprecated in v0.10.0) ([#4902]) + + +### Fixed + + - onchaind: we sometimes failed to close upstream htlcs if more than one HTLC is in flight during unilateral close. ([#5130]) + - JSON-RPC: `listpays` always includes `bolt11` or `bolt12` field. ([#5122]) + - cli: don't ask to confirm the password if the `hsm_secret` is already encrypted. ([#5085]) + - cli: check if the `hsm_secret` password and the confirmation match from the command line ([#5085]) + - JSON-RPC: `connect` notification now called even if we already have a live channel. ([#5078]) + - docker: The docker image is now built with postgresql support ([#5081]) + - hsmd: Fixed a significant memory leak ([#5051]) + - closingd: more accurate weight estimation helps mutual closing near min/max feerates. ([#5004]) + - Protocol: Always flush sockets to increase chance that final message get to peer (esp. error packets). ([#4984]) + - JSON-RPC: listincoming showed incoming_capacity_msat field 1000 times actual value. ([#4913]) + - Options: Respect --always-use-proxy AND --disable-dns when parsing wireaddresses to listen on. ([#4829]) + - lightningd: remove slow memory leak in DEVELOPER builds. ([#4931]) + - JSON-RPC: `paystatus` entries no longer have two identical `amount_msat` entries. ([#4911]) + - We really do allow providing multiple addresses of the same type. ([#4902]) + + +### EXPERIMENTAL + + - Fixed `experimental-websocket` intermittent read errors ([#5090]) + - Fixed `experimental-websocket-port` not to leave zombie processes. ([#5101]) + - Config option `--lease-fee-base-msat` renamed to `--lease-fee-base-sat` ([#5047]) + - Config option `--lease-fee-base-msat` deprecated and will be removed next release ([#5047]) + - Fixed `experimental-websocket-port` to work with default addresses. ([#4945]) + - Protocol: removed support for v0.10.1 onion messages. ([#4921]) + - Protocol: Ability to announce DNS addresses ([#4829]) + - Protocol: disabled websocket announcement due to LND propagation issues ([#5200]) + + +[#4829]: https://github.com/ElementsProject/lightning/pull/4829 +[#4864]: https://github.com/ElementsProject/lightning/pull/4864 +[#4890]: https://github.com/ElementsProject/lightning/pull/4890 +[#4896]: https://github.com/ElementsProject/lightning/pull/4896 +[#4897]: https://github.com/ElementsProject/lightning/pull/4897 +[#4900]: https://github.com/ElementsProject/lightning/pull/4900 +[#4902]: https://github.com/ElementsProject/lightning/pull/4902 +[#4906]: https://github.com/ElementsProject/lightning/pull/4906 +[#4908]: https://github.com/ElementsProject/lightning/pull/4908 +[#4911]: https://github.com/ElementsProject/lightning/pull/4911 +[#4913]: https://github.com/ElementsProject/lightning/pull/4913 +[#4921]: https://github.com/ElementsProject/lightning/pull/4921 +[#4925]: https://github.com/ElementsProject/lightning/pull/4925 +[#4929]: https://github.com/ElementsProject/lightning/pull/4929 +[#4931]: https://github.com/ElementsProject/lightning/pull/4931 +[#4945]: https://github.com/ElementsProject/lightning/pull/4945 +[#4984]: https://github.com/ElementsProject/lightning/pull/4984 +[#4985]: https://github.com/ElementsProject/lightning/pull/4985 +[#5004]: https://github.com/ElementsProject/lightning/pull/5004 +[#5010]: https://github.com/ElementsProject/lightning/pull/5010 +[#5013]: https://github.com/ElementsProject/lightning/pull/5013 +[#5016]: https://github.com/ElementsProject/lightning/pull/5016 +[#5019]: https://github.com/ElementsProject/lightning/pull/5019 +[#5043]: https://github.com/ElementsProject/lightning/pull/5043 +[#5047]: https://github.com/ElementsProject/lightning/pull/5047 +[#5051]: https://github.com/ElementsProject/lightning/pull/5051 +[#5052]: https://github.com/ElementsProject/lightning/pull/5052 +[#5058]: https://github.com/ElementsProject/lightning/pull/5058 +[#5078]: https://github.com/ElementsProject/lightning/pull/5078 +[#5081]: https://github.com/ElementsProject/lightning/pull/5081 +[#5085]: https://github.com/ElementsProject/lightning/pull/5085 +[#5086]: https://github.com/ElementsProject/lightning/pull/5086 +[#5090]: https://github.com/ElementsProject/lightning/pull/5090 +[#5101]: https://github.com/ElementsProject/lightning/pull/5101 +[#5103]: https://github.com/ElementsProject/lightning/pull/5103 +[#5104]: https://github.com/ElementsProject/lightning/pull/5104 +[#5120]: https://github.com/ElementsProject/lightning/pull/5120 +[#5121]: https://github.com/ElementsProject/lightning/pull/5121 +[#5122]: https://github.com/ElementsProject/lightning/pull/5122 +[#5130]: https://github.com/ElementsProject/lightning/pull/5130 +[#5136]: https://github.com/ElementsProject/lightning/pull/5136 +[#5146]: https://github.com/ElementsProject/lightning/pull/5146 +[#5200]: https://github.com/ElementsProject/lightning/pull/5200 +[0.11.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.0 + ## [0.10.2] - 2021-11-03: Bitcoin Dust Consensus Rule This release named by @vincenzopalazzo. @@ -1515,6 +1863,10 @@ There predate the BOLT specifications, and are only of vague historic interest: 6. [0.5.1] - 2016-10-21 7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II" +[0.12.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.12.0 +[0.11.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.2 +[0.11.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.1 +[0.11.0.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.0.1 [0.10.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.10.1 [0.10.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.10.0 [0.9.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.9.2 diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000000..15d0c1185d25 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1469 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" + +[[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bitcoin_hashes" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006cc91e1a1d99819bc5b8214be3555c1f0611b169f527a1fdc54ed1f2b745b0" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bumpalo" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" + +[[package]] +name = "bytes" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" + +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "cln-grpc" +version = "0.0.1" +dependencies = [ + "anyhow", + "bitcoin_hashes", + "cln-rpc", + "hex", + "log", + "prost", + "serde_json", + "tonic", + "tonic-build", +] + +[[package]] +name = "cln-grpc-plugin" +version = "0.1.0" +dependencies = [ + "anyhow", + "cln-grpc", + "cln-plugin", + "cln-rpc", + "log", + "prost", + "rcgen", + "tokio", + "tonic", +] + +[[package]] +name = "cln-plugin" +version = "0.1.0" +dependencies = [ + "anyhow", + "bytes", + "cln-grpc", + "cln-rpc", + "env_logger", + "futures", + "log", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", +] + +[[package]] +name = "cln-rpc" +version = "0.1.0" +dependencies = [ + "anyhow", + "bitcoin_hashes", + "bytes", + "env_logger", + "futures-util", + "hex", + "log", + "secp256k1", + "serde", + "serde_json", + "tokio", + "tokio-util 0.6.10", +] + +[[package]] +name = "data-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" + +[[package]] +name = "der-oid-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c73af209b6a5dc8ca7cbaba720732304792cddc933cfea3d74509c2b1ef2f436" +dependencies = [ + "num-bigint", + "num-traits", + "syn", +] + +[[package]] +name = "der-parser" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cddf120f700b411b2b02ebeb7f04dc0b7c8835909a6c2f52bf72ed0dd3433b2" +dependencies = [ + "der-oid-macro", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "env_logger" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" + +[[package]] +name = "futures-executor" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" + +[[package]] +name = "futures-macro" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" + +[[package]] +name = "futures-task" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" + +[[package]] +name = "futures-util" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "h2" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util 0.7.4", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "indexmap" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mio" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "nom" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "oid-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe554cb2393bc784fd678c82c84cc0599c31ceadc7f03a594911f822cb8d1815" +dependencies = [ + "der-parser", +] + +[[package]] +name = "once_cell" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + +[[package]] +name = "pem" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" +dependencies = [ + "base64", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" + +[[package]] +name = "proc-macro2" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd7356a8122b6c4a24a82b278680c73357984ca2fc79a0f9fa6dea7dced7c58" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" +dependencies = [ + "bytes", + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" +dependencies = [ + "bytes", + "prost", +] + +[[package]] +name = "quote" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rcgen" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5911d1403f4143c9d56a702069d593e8d0f3fab880a85e103604d0893ea31ba7" +dependencies = [ + "chrono", + "pem", + "ring", + "x509-parser", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secp256k1" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26947345339603ae8395f68e2f3d85a6b0a8ddfe6315818e80b8504415099db0" +dependencies = [ + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152e20a0fd0519390fc43ab404663af8a0b794273d2a91d60ad4a39f13ffe110" +dependencies = [ + "cc", +] + +[[package]] +name = "serde" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "syn" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a99cb8c4b9a8ef0e7907cd3b617cc8dc04d571c4e73c8ae403d80ac160bb122" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a891860d3c8d66fec8e73ddb3765f90082374dbaaa833407b904a94f1a7eb43" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "once_cell", + "pin-project-lite", + "socket2", + "tokio-macros", + "winapi", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-stream" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6edf2d6bc038a43d31353570e27270603f4648d18f5ed10c0e179abe43255af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796c5e1cd49905e65dd8e700d4cb1dffcbfdb4fc9d017de08c1a537afd83627c" +dependencies = [ + "async-stream", + "async-trait", + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "prost-derive", + "tokio", + "tokio-rustls", + "tokio-stream", + "tokio-util 0.6.10", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tonic-build" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b52d07035516c2b74337d2ac7746075e7dcae7643816c1b12c5ff8a7484c08" +dependencies = [ + "proc-macro2", + "prost-build", + "quote", + "syn", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project", + "pin-project-lite", + "rand", + "slab", + "tokio", + "tokio-util 0.7.4", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "unicode-ident" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" + +[[package]] +name = "unicode-segmentation" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "x509-parser" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc90836a84cb72e6934137b1504d0cae304ef5d83904beb0c8d773bbfe256ed" +dependencies = [ + "base64", + "chrono", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "ring", + "rusticata-macros", + "thiserror", +] + +[[package]] +name = "yasna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e262a29d0e61ccf2b6190d7050d4b237535fc76ce4c1210d9caa316f71dffa75" +dependencies = [ + "chrono", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000000..c1662d06de85 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[profile.release] +strip = "debuginfo" + +[workspace] +members = [ + "cln-rpc", + "cln-grpc", + "plugins", + "plugins/grpc-plugin", +] diff --git a/Dockerfile b/Dockerfile index a6b7e1d4734c..43ffe691e10a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -# This dockerfile is meant to compile a c-lightning x64 image +# This dockerfile is meant to compile a core-lightning x64 image # It is using multi stage build: -# * downloader: Download litecoin/bitcoin and qemu binaries needed for c-lightning -# * builder: Compile c-lightning dependencies, then c-lightning itself with static linking +# * downloader: Download litecoin/bitcoin and qemu binaries needed for core-lightning +# * builder: Compile core-lightning dependencies, then core-lightning itself with static linking # * final: Copy the binaries required at runtime # The resulting image uploaded to dockerhub will only contain what is needed for runtime. # From the root of the repository, run "docker build -t yourimage:yourtag ." -FROM debian:buster-slim as downloader +FROM debian:bullseye-slim as downloader RUN set -ex \ && apt-get update \ @@ -17,16 +17,16 @@ RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18. && echo "12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855 /opt/tini" | sha256sum -c - \ && chmod +x /opt/tini -ARG BITCOIN_VERSION=0.18.1 +ARG BITCOIN_VERSION=22.0 ENV BITCOIN_TARBALL bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL -ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc +ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS RUN mkdir /opt/bitcoin && cd /opt/bitcoin \ && wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \ - && wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \ - && grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \ - && sha256sum -c SHA256SUMS.asc \ + && wget -qO bitcoin "$BITCOIN_ASC_URL" \ + && grep $BITCOIN_TARBALL bitcoin | tee SHA256SUMS \ + && sha256sum -c SHA256SUMS \ && BD=bitcoin-$BITCOIN_VERSION/bin \ && tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \ && rm $BITCOIN_TARBALL @@ -45,17 +45,44 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \ && tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \ && rm litecoin.tar.gz -FROM debian:buster-slim as builder +ENV DESCHASHPLUGIN_URL https://github.com/fiatjaf/sparko/releases/download/invoicewithdescriptionhash-v1.2/invoicewithdescriptionhash_linux_amd64 +ENV DESCHASHPLUGIN_SHA256 E3EA0D076A26D774BA68D1D5E3FE48D267CE02D077933EF3CBAE1FC39007FB11 +RUN mkdir /opt/deschashplugin && cd /opt/deschashplugin \ + && wget -qO invoicewithdescriptionhash "$DESCHASHPLUGIN_URL" \ + && echo "$DESCHASHPLUGIN_SHA256 invoicewithdescriptionhash" | sha256sum -c - \ + && chmod a+x invoicewithdescriptionhash -ENV LIGHTNINGD_VERSION=master -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates autoconf automake build-essential git libtool python3 python3-mako wget gnupg dirmngr git gettext +FROM debian:bullseye-slim as builder -RUN wget -q https://zlib.net/zlib-1.2.11.tar.gz \ -&& tar xvf zlib-1.2.11.tar.gz \ -&& cd zlib-1.2.11 \ +ENV LIGHTNINGD_VERSION=master +RUN apt-get update -qq && \ + apt-get install -qq -y --no-install-recommends \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + curl \ + dirmngr \ + gettext \ + git \ + gnupg \ + libpq-dev \ + libtool \ + libffi-dev \ + python3 \ + python3-dev \ + python3-mako \ + python3-pip \ + python3-venv \ + python3-setuptools \ + wget + +RUN wget -q https://zlib.net/zlib-1.2.12.tar.gz \ +&& tar xvf zlib-1.2.12.tar.gz \ +&& cd zlib-1.2.12 \ && ./configure \ && make \ -&& make install && cd .. && rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11 +&& make install && cd .. && rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12 RUN apt-get install -y --no-install-recommends unzip tclsh \ && wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \ @@ -72,19 +99,43 @@ RUN wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \ && make \ && make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2 +ENV RUST_PROFILE=release +ENV PATH=$PATH:/root/.cargo/bin/ +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN rustup toolchain install stable --component rustfmt --allow-downgrade + WORKDIR /opt/lightningd COPY . /tmp/lightning RUN git clone --recursive /tmp/lightning . && \ git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD) - ARG DEVELOPER=0 ENV PYTHON_VERSION=3 +RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 - \ + && pip3 install -U pip \ + && pip3 install -U wheel \ + && /root/.local/bin/poetry config virtualenvs.create false \ + && /root/.local/bin/poetry install +RUN pip3 install mrkd RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install -FROM debian:buster-slim as final +FROM debian:bullseye-slim as final + +ARG TRACE_TOOLS=false +ENV TRACE_TOOLS=$TRACE_TOOLS +ENV TRACE_LOCATION=/opt/traces +VOLUME /opt/traces COPY --from=downloader /opt/tini /usr/bin/tini -RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \ +RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip libpq5\ + && \ + ( ! $TRACE_TOOLS || \ + ( \ + apt-get install -y --no-install-recommends perl linux-base curl ca-certificates && \ + mkdir FlameGraph && cd FlameGraph && \ + curl -Lo FlameGraph.tar.gz "https://github.com/brendangregg/FlameGraph/archive/v1.0.tar.gz" && \ + tar -zxvf FlameGraph.tar.gz --strip-components=1 && rm FlameGraph.tar.gz && cd .. \ + ) \ + ) \ && rm -rf /var/lib/apt/lists/* ENV LIGHTNINGD_DATA=/root/.lightning @@ -93,11 +144,15 @@ ENV LIGHTNINGD_PORT=9735 ENV LIGHTNINGD_NETWORK=bitcoin RUN mkdir $LIGHTNINGD_DATA && \ + mkdir /etc/bundledplugins && \ + mkdir $LIGHTNINGD_DATA/plugins && \ touch $LIGHTNINGD_DATA/config VOLUME [ "/root/.lightning" ] COPY --from=builder /tmp/lightning_install/ /usr/local/ COPY --from=downloader /opt/bitcoin/bin /usr/bin COPY --from=downloader /opt/litecoin/bin /usr/bin +COPY --from=downloader /opt/deschashplugin $LIGHTNINGD_DATA/plugins +COPY --from=downloader /opt/deschashplugin /etc/bundledplugins COPY tools/docker-entrypoint.sh entrypoint.sh EXPOSE 9735 9835 diff --git a/LICENSE b/LICENSE index 582800a0a8c2..15ef029efec9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ Note: the modules in the ccan/ directory have their own licenses, but the rest of the code is covered by the following (BSD-MIT) license: - Copyright Rusty Russell (Blockstream) 2015. + Copyright Rusty Russell (Blockstream) 2015-2022. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index efd3feba06a2..bc7983ec17c5 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,6 @@ # Extract version from git, or if we're from a zipfile, use dirname VERSION=$(shell git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|\1|gp') -ifeq ($(VERSION),) -$(error "ERROR: git is required for generating version information") -endif - # --quiet / -s means quiet, dammit! ifeq ($(findstring s,$(word 1, $(MAKEFLAGS))),s) ECHO := : @@ -17,14 +13,17 @@ SUPPRESS_OUTPUT := endif DISTRO=$(shell lsb_release -is 2>/dev/null || echo unknown)-$(shell lsb_release -rs 2>/dev/null || echo unknown) +OS=$(shell uname -s) +ARCH=$(shell uname -m) +# Changing this could break installs! PKGNAME = c-lightning # We use our own internal ccan copy. CCANDIR := ccan # Where we keep the BOLT RFCs -BOLTDIR := ../lightning-rfc/ -DEFAULT_BOLTVERSION := 498f104fd399488c77f449d05cb21c0b604636a2 +BOLTDIR := ../bolts/ +DEFAULT_BOLTVERSION := f32c6ddb5f11b431c9bb4f501cdec604172a90de # Can be overridden on cmdline. BOLTVERSION := $(DEFAULT_BOLTVERSION) @@ -75,14 +74,18 @@ endif ifeq ($(COMPAT),1) # We support compatibility with pre-0.6. -COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 +COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DCOMPAT_V0121=1 endif # (method=thread to support xdist) PYTEST_OPTS := -v -p no:logging $(PYTEST_OPTS) -PYTHONPATH=$(shell pwd)/contrib/pyln-client:$(shell pwd)/contrib/pyln-testing:$(shell pwd)/contrib/pyln-proto/:$(shell pwd)/external/lnprototest:$(shell pwd)/contrib/pyln-spec/bolt1:$(shell pwd)/contrib/pyln-spec/bolt2:$(shell pwd)/contrib/pyln-spec/bolt4:$(shell pwd)/contrib/pyln-spec/bolt7 +MY_CHECK_PYTHONPATH=$${PYTHONPATH}$${PYTHONPATH:+:}$(shell pwd)/contrib/pyln-client:$(shell pwd)/contrib/pyln-testing:$(shell pwd)/contrib/pyln-proto/:$(shell pwd)/external/lnprototest:$(shell pwd)/contrib/pyln-spec/bolt1:$(shell pwd)/contrib/pyln-spec/bolt2:$(shell pwd)/contrib/pyln-spec/bolt4:$(shell pwd)/contrib/pyln-spec/bolt7 # Collect generated python files to be excluded from lint checks -PYTHON_GENERATED= +PYTHON_GENERATED= \ + contrib/pyln-testing/pyln/testing/primitives_pb2.py \ + contrib/pyln-testing/pyln/testing/node_pb2_grpc.py \ + contrib/pyln-testing/pyln/testing/node_pb2.py \ + contrib/pyln-testing/pyln/testing/grpc2py.py # Options to pass to cppcheck. Mostly used to exclude files that are # generated with external tools that we don't have control over @@ -93,6 +96,7 @@ FEATURES := CCAN_OBJS := \ ccan-asort.o \ + ccan-base64.o \ ccan-bitmap.o \ ccan-bitops.o \ ccan-breakpoint.o \ @@ -128,10 +132,13 @@ CCAN_OBJS := \ ccan-ptr_valid.o \ ccan-rbuf.o \ ccan-read_write_all.o \ + ccan-rune-coding.o \ + ccan-rune-rune.o \ ccan-str-base32.o \ ccan-str-hex.o \ ccan-str.o \ ccan-strmap.o \ + ccan-strset.o \ ccan-take.o \ ccan-tal-grab_file.o \ ccan-tal-link.o \ @@ -169,6 +176,7 @@ CCAN_HEADERS := \ $(CCANDIR)/ccan/endian/endian.h \ $(CCANDIR)/ccan/err/err.h \ $(CCANDIR)/ccan/fdpass/fdpass.h \ + $(CCANDIR)/ccan/graphql/graphql.h \ $(CCANDIR)/ccan/htable/htable.h \ $(CCANDIR)/ccan/htable/htable_type.h \ $(CCANDIR)/ccan/ilog/ilog.h \ @@ -194,12 +202,15 @@ CCAN_HEADERS := \ $(CCANDIR)/ccan/ptrint/ptrint.h \ $(CCANDIR)/ccan/rbuf/rbuf.h \ $(CCANDIR)/ccan/read_write_all/read_write_all.h \ + $(CCANDIR)/ccan/rune/internal.h \ + $(CCANDIR)/ccan/rune/rune.h \ $(CCANDIR)/ccan/short_types/short_types.h \ $(CCANDIR)/ccan/str/base32/base32.h \ $(CCANDIR)/ccan/str/hex/hex.h \ $(CCANDIR)/ccan/str/str.h \ $(CCANDIR)/ccan/str/str_debug.h \ $(CCANDIR)/ccan/strmap/strmap.h \ + $(CCANDIR)/ccan/strset/strset.h \ $(CCANDIR)/ccan/structeq/structeq.h \ $(CCANDIR)/ccan/take/take.h \ $(CCANDIR)/ccan/tal/grab_file/grab_file.h \ @@ -224,12 +235,29 @@ WIRE_GEN_DEPS := $(WIRE_GEN) $(wildcard tools/gen/*_template) # These are filled by individual Makefiles ALL_PROGRAMS := ALL_TEST_PROGRAMS := +ALL_TEST_GEN := ALL_FUZZ_TARGETS := ALL_C_SOURCES := ALL_C_HEADERS := header_versions_gen.h version_gen.h +# Extra (non C) targets that should be built by default. +DEFAULT_TARGETS := + +# M1 macos machines with homebrew will install the native libraries in +# /opt/homebrew instead of /usr/local, most likely because they +# emulate x86_64 compatibility via Rosetta, and wanting to keep the +# libraries separate. This however means we also need to switch out +# the paths accordingly when we detect we're on an M1 macos machine. +ifeq ("$(OS)-$(ARCH)", "Darwin-arm64") +CPATH := /opt/homebrew/include +LIBRARY_PATH := /opt/homebrew/lib +else +CPATH := /usr/local/include +LIBRARY_PATH := /usr/local/lib +endif CPPFLAGS += -DBINTOPKGLIBEXECDIR="\"$(shell sh tools/rel.sh $(bindir) $(pkglibexecdir))\"" -CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(SQLITE3_CFLAGS) $(POSTGRES_INCLUDE) $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS) -DBUILD_ELEMENTS=1 +CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I$(CPATH) $(SQLITE3_CFLAGS) $(POSTGRES_INCLUDE) $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS) -DBUILD_ELEMENTS=1 + # If CFLAGS is already set in the environment of make (to whatever value, it # does not matter) then it would export it to subprocesses with the above value # we set, including CWARNFLAGS which by default contains -Wall -Werror. This @@ -247,9 +275,9 @@ ifeq ($(STATIC),1) # For MacOS, Jacob Rapoport changed this to: # -L/usr/local/lib -Wl,-lgmp -lsqlite3 -lz -Wl,-lm -lpthread -ldl $(COVFLAGS) # But that doesn't static link. -LDLIBS = -L/usr/local/lib -Wl,-dn -lgmp $(SQLITE3_LDLIBS) -lz -Wl,-dy -lm -lpthread -ldl $(COVFLAGS) +LDLIBS = -L$(CPATH) -Wl,-dn -lgmp $(SQLITE3_LDLIBS) -lz -Wl,-dy -lm -lpthread -ldl $(COVFLAGS) else -LDLIBS = -L/usr/local/lib -lm -lgmp $(SQLITE3_LDLIBS) -lz $(COVFLAGS) +LDLIBS = -L$(CPATH) -lm -lgmp $(SQLITE3_LDLIBS) -lz $(COVFLAGS) endif # If we have the postgres client library we need to link against it as well @@ -257,7 +285,7 @@ ifeq ($(HAVE_POSTGRES),1) LDLIBS += $(POSTGRES_LDLIBS) endif -default: show-flags all-programs all-test-programs doc-all +default: show-flags all-programs all-test-programs doc-all default-targets ifneq ($(SUPPRESS_GENERATION),1) FORCE = FORCE @@ -320,10 +348,18 @@ endif $(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//,)); \ fi +RUST_PROFILE ?= debug +ifneq ($(RUST_PROFILE),debug) +CARGO_OPTS := --profile=$(RUST_PROFILE) --quiet +else +CARGO_OPTS := --quiet +endif + include external/Makefile include bitcoin/Makefile include common/Makefile include wire/Makefile +include db/Makefile include hsmd/Makefile include gossipd/Makefile include openingd/Makefile @@ -338,10 +374,29 @@ include devtools/Makefile include tools/Makefile include plugins/Makefile include tests/plugins/Makefile -include contrib/libhsmd_python/Makefile + ifneq ($(FUZZING),0) include tests/fuzz/Makefile endif +ifneq ($(RUST),0) + include cln-rpc/Makefile + include cln-grpc/Makefile + +GRPC_GEN = contrib/pyln-testing/pyln/testing/node_pb2.py \ + contrib/pyln-testing/pyln/testing/node_pb2_grpc.py \ + contrib/pyln-testing/pyln/testing/primitives_pb2.py + +ALL_TEST_GEN += $(GRPC_GEN) + +$(GRPC_GEN): cln-grpc/proto/node.proto cln-grpc/proto/primitives.proto + python -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/node.proto --python_out=contrib/pyln-testing/pyln/testing/ --grpc_python_out=contrib/pyln-testing/pyln/testing/ --experimental_allow_proto3_optional + python -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/primitives.proto --python_out=contrib/pyln-testing/pyln/testing/ --experimental_allow_proto3_optional + # The compiler assumes that the proto files are in the same + # directory structure as the generated files will be. Since we + # don't do that we need to path the files up. + find contrib/pyln-testing/pyln/testing/ -type f -name "*.py" -print0 | xargs -0 sed -i 's/^import \(.*\)_pb2 as .*__pb2/from . import \1_pb2 as \1__pb2/g' + +endif # We make pretty much everything depend on these. ALL_GEN_HEADERS := $(filter %gen.h,$(ALL_C_HEADERS)) @@ -401,19 +456,19 @@ ifeq ($(PYTEST),) @echo "py.test is required to run the protocol tests, please install using 'pip3 install -r requirements.txt', and rerun 'configure'."; false else ifeq ($(DEVELOPER),1) - @(cd external/lnprototest && PYTHONPATH=$(PYTHONPATH) LIGHTNING_SRC=../.. $(PYTEST) --runner lnprototest.clightning.Runner $(PYTEST_OPTS)) + @(cd external/lnprototest && PYTHONPATH=$(MY_CHECK_PYTHONPATH) LIGHTNING_SRC=../.. $(PYTEST) --runner lnprototest.clightning.Runner $(PYTEST_OPTS)) else @echo "lnprototest target requires DEVELOPER=1, skipping" endif endif -pytest: $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS) +pytest: $(ALL_PROGRAMS) $(DEFAULT_TARGETS) $(ALL_TEST_PROGRAMS) $(ALL_TEST_GEN) ifeq ($(PYTEST),) @echo "py.test is required to run the integration tests, please install using 'pip3 install -r requirements.txt', and rerun 'configure'." exit 1 else # Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line. - PYTHONPATH=$(PYTHONPATH) TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) + PYTHONPATH=$(MY_CHECK_PYTHONPATH) TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) endif # Keep includes in alpha order. @@ -464,13 +519,13 @@ check-markdown: check-spelling: @tools/check-spelling.sh -PYSRC=$(shell git ls-files "*.py" | grep -v /text.py) contrib/pylightning/lightning-pay +PYSRC=$(shell git ls-files "*.py" | grep -v /text.py) # Some tests in pyln will need to find lightningd to run, so have a PATH that # allows it to find that PYLN_PATH=$(shell pwd)/lightningd:$(PATH) check-pyln-%: $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) - @(cd contrib/$(shell echo $@ | cut -b 7-) && PATH=$(PYLN_PATH) PYTHONPATH=$(PYTHONPATH) $(MAKE) check) + @(cd contrib/$(shell echo $@ | cut -b 7-) && PATH=$(PYLN_PATH) PYTHONPATH=$(MY_CHECK_PYTHONPATH) $(MAKE) check) check-python: check-python-flake8 check-pytest-pyln-proto check-pyln-client check-pyln-testing @@ -479,10 +534,10 @@ check-python-flake8: @# E731 do not assign a lambda expression, use a def @# W503: line break before binary operator @# E741: ambiguous variable name - @flake8 --ignore=E501,E731,E741,W503 --exclude $(shell echo ${PYTHON_GENERATED} | sed 's/ \+/,/g') ${PYSRC} + @flake8 --ignore=E501,E731,E741,W503,F541 --exclude $(shell echo ${PYTHON_GENERATED} | sed 's/ \+/,/g') ${PYSRC} check-pytest-pyln-proto: - PATH=$(PYLN_PATH) PYTHONPATH=$(PYTHONPATH) $(PYTEST) contrib/pyln-proto/tests/ + PATH=$(PYLN_PATH) PYTHONPATH=$(MY_CHECK_PYTHONPATH) $(PYTEST) contrib/pyln-proto/tests/ check-includes: check-src-includes check-hdr-includes @tools/check-includes.sh @@ -524,7 +579,18 @@ full-check: check check-source # # Do not run on your development tree since it will complain if you # have a dirty tree. -check-gen-updated: $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) wallet/statements_gettextgen.po $(MANPAGES) +CHECK_GEN_ALL = \ + $(CLN_GRPC_GENALL) \ + $(CLN_RPC_GENALL) \ + $(MANPAGES) \ + $(WALLET_DB_QUERIES) \ + $(PYTHON_GENERATED) \ + $(ALL_GEN_HEADERS) \ + $(ALL_GEN_SOURCES) \ + wallet/statements_gettextgen.po \ + .msggen.json + +check-gen-updated: $(CHECK_GEN_ALL) @echo "Checking for generated files being changed by make" git diff --exit-code HEAD $? @@ -544,22 +610,37 @@ ncc: ${TARGET_DIR}/libwally-core-build/src/libwallycore.la TAGS: $(RM) TAGS; find * -name test -type d -prune -o -name '*.[ch]' -print -o -name '*.py' -print | xargs etags --append +tags: + $(RM) tags; find * -name test -type d -prune -o -name '*.[ch]' -print -o -name '*.py' -print | xargs ctags --append + ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS) ALL_PROGRAMS += ccan/ccan/cdump/tools/cdump-enumstr # Can't add to ALL_OBJS, as that makes a circular dep. ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS) Makefile +# Without a working git, you can't generate this file, so assume if it exists +# it is ok (fixes "sudo make install"). +ifeq ($(VERSION),) +version_gen.h: + echo "ERROR: git is required for generating version information" >&2 + exit 1 +else version_gen.h: $(FORCE) @(echo "#define VERSION \"$(VERSION)\"" && echo "#define BUILD_FEATURES \"$(FEATURES)\"") > $@.new @if cmp $@.new $@ >/dev/null 2>&1; then rm -f $@.new; else mv $@.new $@; $(ECHO) Version updated; fi +endif # That forces this rule to be run every time, too. header_versions_gen.h: tools/headerversions @tools/headerversions $@ +# We make a static library, this way linker can discard unused parts. +libccan.a: $(CCAN_OBJS) + @$(call VERBOSE, "ar $@", $(AR) r $@ $(CCAN_OBJS)) + # All binaries require the external libs, ccan and system library versions. -$(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS): $(EXTERNAL_LIBS) $(CCAN_OBJS) +$(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS): $(EXTERNAL_LIBS) libccan.a # Each test program depends on its own object. $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS): %: %.o @@ -569,13 +650,13 @@ $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS): %: %.o # uses some ccan modules internally). We want to rely on -lwallycore etc. # (as per EXTERNAL_LDLIBS) so we filter them out here. $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS): - @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) -o $@) + @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) libccan.a -o $@) # We special case the fuzzing target binaries, as they need to link against libfuzzer, # which brings its own main(). FUZZ_LDFLAGS = -fsanitize=fuzzer $(ALL_FUZZ_TARGETS): - @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) $(FUZZ_LDFLAGS) -o $@) + @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) libccan.a $(FUZZ_LDFLAGS) -o $@) # Everything depends on the CCAN headers, and Makefile @@ -601,6 +682,7 @@ update-ccan: # Now ALL_PROGRAMS is fully populated, we can expand it. all-programs: $(ALL_PROGRAMS) all-test-programs: $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS) +default-targets: $(DEFAULT_TARGETS) distclean: clean $(RM) ccan/config.h config.vars @@ -608,14 +690,14 @@ distclean: clean maintainer-clean: distclean @echo 'This command is intended for maintainers to use; it' @echo 'deletes files that may need special tools to rebuild.' - $(RM) $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) # We used to have gen_ files, now we have _gen files. obsclean: $(RM) gen_*.h */gen_*.[ch] */*/gen_*.[ch] clean: obsclean - $(RM) $(CCAN_OBJS) $(CDUMP_OBJS) $(ALL_OBJS) + $(RM) libccan.a $(CCAN_OBJS) $(CDUMP_OBJS) $(ALL_OBJS) + $(RM) $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) $(RM) $(ALL_PROGRAMS) $(RM) $(ALL_TEST_PROGRAMS) $(RM) $(ALL_FUZZ_TARGETS) @@ -624,6 +706,21 @@ clean: obsclean find . -name '*gcda' -delete find . -name '*gcno' -delete find . -name '*.nccout' -delete + if [ "${RUST}" -eq "1" ]; then cargo clean; fi + + +PYLNS=client proto testing +# See doc/MAKING-RELEASES.md +update-pyln-versions: $(PYLNS:%=update-pyln-version-%) + +update-pyln-version-%: + @if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi + cd contrib/pyln-$* && $(MAKE) upgrade-version + +pyln-release: $(PYLNS:%=pyln-release-%) + +pyln-release-%: + cd contrib/pyln-$* && $(MAKE) prod-release # These must both be enabled for update-mocks ifeq ($(DEVELOPER)$(EXPERIMENTAL_FEATURES),11) @@ -633,7 +730,7 @@ update-mocks: @echo Need DEVELOPER=1 and EXPERIMENTAL_FEATURES=1 to regenerate mocks >&2; exit 1 endif -$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) $(CCAN_OBJS) ccan/ccan/cdump/tools/cdump-enumstr config.vars +$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) libccan.a ccan/ccan/cdump/tools/cdump-enumstr config.vars update-mocks/%: % @MAKE=$(MAKE) tools/update-mocks.sh "$*" $(SUPPRESS_OUTPUT) @@ -755,14 +852,18 @@ installcheck: all-programs installcheck ncc bin-tarball show-flags # Make a tarball of opt/clightning/, optionally with label for distribution. +ifneq ($(VERSION),) bin-tarball: clightning-$(VERSION)-$(DISTRO).tar.xz clightning-$(VERSION)-$(DISTRO).tar.xz: DESTDIR=$(shell pwd)/ clightning-$(VERSION)-$(DISTRO).tar.xz: prefix=opt/clightning clightning-$(VERSION)-$(DISTRO).tar.xz: install trap "rm -rf opt" 0; tar cvfa $@ opt/ +endif ccan-breakpoint.o: $(CCANDIR)/ccan/breakpoint/breakpoint.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) +ccan-base64.o: $(CCANDIR)/ccan/base64/base64.c + @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-tal.o: $(CCANDIR)/ccan/tal/tal.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-tal-str.o: $(CCANDIR)/ccan/tal/str/str.c @@ -815,6 +916,8 @@ ccan-cdump.o: $(CCANDIR)/ccan/cdump/cdump.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-strmap.o: $(CCANDIR)/ccan/strmap/strmap.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) +ccan-strset.o: $(CCANDIR)/ccan/strset/strset.c + @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-crypto-siphash24.o: $(CCANDIR)/ccan/crypto/siphash24/siphash24.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-htable.o: $(CCANDIR)/ccan/htable/htable.c @@ -861,3 +964,7 @@ ccan-json_out.o: $(CCANDIR)/ccan/json_out/json_out.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) ccan-closefrom.o: $(CCANDIR)/ccan/closefrom/closefrom.c @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) +ccan-rune-rune.o: $(CCANDIR)/ccan/rune/rune.c + @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) +ccan-rune-coding.o: $(CCANDIR)/ccan/rune/coding.c + @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) diff --git a/README.md b/README.md index ad7ee770ff8b..325a99b49f55 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# c-lightning: A specification compliant Lightning Network implementation in C +# Core Lightning (CLN): A specification compliant Lightning Network implementation in C -c-lightning is a lightweight, highly customizable and [standard compliant][std] implementation of the Lightning Network protocol. +Core Lightning (previously c-lightning) is a lightweight, highly customizable and [standard compliant][std] implementation of the Lightning Network protocol. * [Getting Started](#getting-started) * [Installation](#installation) @@ -28,11 +28,11 @@ This implementation has been in production use on the Bitcoin mainnet since earl We recommend getting started by experimenting on `testnet` (or `regtest`), but the implementation is considered stable and can be safely used on mainnet. Any help testing the implementation, reporting bugs, or helping with outstanding issues is very welcome. -Don't hesitate to reach out to us on IRC at [#lightning-dev @ libera.chat][irc1], [#c-lightning @ libera.chat][irc2], or on the implementation-specific mailing list [c-lightning@lists.ozlabs.org][ml1], or on the Lightning Network-wide mailing list [lightning-dev@lists.linuxfoundation.org][ml2]. +Don't hesitate to reach out to us on IRC at [#lightning-dev @ libera.chat][irc1], [#c-lightning @ libera.chat][irc2], or on the implementation-specific mailing list [c-lightning@lists.ozlabs.org][ml1], or on the Lightning Network-wide mailing list [lightning-dev@lists.linuxfoundation.org][ml2], or on Discord [core-lightning][discord], or on Telegram [Core Lightning][telegram]. ## Getting Started -c-lightning only works on Linux and Mac OS, and requires a locally (or remotely) running `bitcoind` (version 0.16 or above) that is fully caught up with the network you're running on, and relays transactions (ie with `blocksonly=0`). +Core Lightning only works on Linux and macOS, and requires a locally (or remotely) running `bitcoind` (version 0.16 or above) that is fully caught up with the network you're running on, and relays transactions (ie with `blocksonly=0`). Pruning (`prune=n` option in `bitcoin.conf`) is partially supported, see [here](#pruning) for more details. ### Installation @@ -40,7 +40,7 @@ Pruning (`prune=n` option in `bitcoin.conf`) is partially supported, see [here]( There are 4 supported installation options: - Installation from the [Ubuntu PPA][ppa]. - - Installation of a pre-compiled binary from the [release page][releases] on Github. + - Installation of a pre-compiled binary from the [release page][releases] on GitHub. - Using one of the [provided docker images][dockerhub] on the Docker Hub. - Compiling the source code yourself as described in the [installation documentation](doc/INSTALL.md). @@ -95,7 +95,7 @@ This creates a `.lightning/` subdirectory in your home directory: see `man -l do ### Using The JSON-RPC Interface -c-lightning exposes a [JSON-RPC 2.0][jsonrpcspec] interface over a Unix Domain socket; the `lightning-cli` tool can be used to access it, or there is a [python client library](contrib/pyln-client). +Core Lightning exposes a [JSON-RPC 2.0][jsonrpcspec] interface over a Unix Domain socket; the `lightning-cli` tool can be used to access it, or there is a [python client library](contrib/pyln-client). You can use `lightning-cli help` to print a table of RPC methods; `lightning-cli help ` will offer specific information on that command. @@ -116,7 +116,7 @@ Once you've started for the first time, there's a script called `contrib/bootstrap-node.sh` which will connect you to other nodes on the lightning network. -There are also numerous plugins available for c-lightning which add +There are also numerous plugins available for Core Lightning which add capabilities: in particular there's a collection at: https://github.com/lightningd/plugins @@ -183,7 +183,7 @@ lightning-cli invoice