Skip to content

Commit 73d4ef6

Browse files
authored
Merge branch 'ElementsProject:master' into bolt12_offer_issuer_id
2 parents 7338932 + 5a3943f commit 73d4ef6

File tree

21 files changed

+354
-206
lines changed

21 files changed

+354
-206
lines changed

.github/scripts/setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
5454
valgrind \
5555
wget \
5656
xsltproc \
57+
systemtap-sdt-dev \
5758
zlib1g-dev
5859

5960
echo "tester ALL=(root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/tester

.github/workflows/bsd.yml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ jobs:
2323
uses: vmactions/freebsd-vm@v1
2424
with:
2525
usesh: true
26+
sync: rsync
27+
copyback: false
2628
prepare: |
2729
pkg install -y \
2830
bash \
2931
wget \
30-
python38 \
32+
python310 \
3133
gmake \
3234
git \
3335
python \
@@ -39,38 +41,26 @@ jobs:
3941
gettext \
4042
sqlite3 \
4143
lowdown \
44+
pkgconf \
45+
jq \
46+
protobuf \
4247
curl
4348
44-
python3.8 -m ensurepip
45-
python3.8 -m pip install --upgrade pip
46-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2024-11-28
49+
python3.10 -m ensurepip
50+
python3.10 -m pip install --upgrade pip
51+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
4752
48-
cd /tmp/ || exit 1
49-
wget https://bitcoincore.org/bin/bitcoin-core-${{ matrix.bitcoind-version }}/bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz
50-
tar -xf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.bz2
51-
sudo mv bitcoin-${{ matrix.bitcoind-version }}/bin/* /usr/local/bin
52-
rm -rf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz bitcoin-${{ matrix.bitcoind-version }}
5353
5454
run: |
55-
PATH=/root/.local/bin:$PATH
55+
PATH=/root/.local/bin:$PATH:/root/.cargo/bin; export PATH
5656
pip install --user -U wheel pip
57-
pip install --user -U -r requirements.txt
58-
59-
# Install utilities that aren't dependencies, but make
60-
# running tests easier/feasible on CI (and pytest which
61-
# keeps breaking the rerunfailures plugin).
62-
pip install --user -U \
63-
blinker \
64-
flake8 \
65-
mako \
66-
pytest-sentry \
67-
pytest-test-groups==1.0.3 \
68-
pytest-custom-exit-code==0.3.0 \
69-
pytest-json-report
57+
pip3 install --user poetry
58+
poetry install
7059
7160
git clone https://github.com/lightning/bolts.git ../bolts
7261
# fatal: unsafe repository ('/Users/runner/work/lightning/lightning' is owned by someone else)
7362
git config --global --add safe.directory `pwd`
63+
for d in libsodium libwally-core gheap jsmn libbacktrace lowdown; do git config --global --add safe.directory `pwd`/external/$d; done
7464
git submodule update --init --recursive
7565
7666
./configure CC="$CC" --disable-valgrind
@@ -85,7 +75,5 @@ jobs:
8575
EOF
8676
8777
# Just run a "quick" test without memory checking
88-
gmake
78+
poetry run gmake
8979
90-
# Clean up to maximize rsync's chances of succeeding
91-
gmake clean

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ include devtools/Makefile
371371
include tools/Makefile
372372
ifneq ($(RUST),0)
373373
include cln-rpc/Makefile
374+
include cln-grpc/Makefile
374375
endif
375376
include plugins/Makefile
376377
include tests/plugins/Makefile

cln-grpc/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cln-grpc"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2021"
55
license = "MIT"
66
description = "The Core Lightning API as grpc primitives. Provides the bindings used to expose the API over the network."
@@ -15,20 +15,21 @@ server = ["cln-rpc"]
1515
[dependencies]
1616
anyhow = "1.0"
1717
log = "0.4"
18-
cln-rpc = { path="../cln-rpc/", version = "0.4", optional = true }
18+
cln-rpc = { path = "../cln-rpc/", version = "0.4", optional = true }
19+
cfg-if = "1.0"
1920
serde = { version = "1.0", features = ["derive"] }
2021
tonic = { version = "0.11", features = ["tls", "transport"] }
2122
prost = "0.12"
2223
hex = "0.4.3"
23-
bitcoin = { version = "0.31", features = [ "serde" ] }
24+
bitcoin = { version = "0.31", features = ["serde"] }
2425
tokio-stream = { version = "0.1.14", features = ["sync"] }
2526
tokio = { version = "1.36.0", features = ["sync"] }
2627
futures-core = "0.3.30"
2728
tokio-util = "0.7.10"
2829

2930
[dev-dependencies]
3031
serde_json = "1.0.72"
31-
cln-rpc = { path="../cln-rpc/", version = "0.4" }
32+
cln-rpc = { path = "../cln-rpc/", version = "0.4" }
3233

3334
[build-dependencies]
3435
tonic-build = "0.11"

cln-grpc/src/lib.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Huge json!() macros require lots of recursion
22
#![recursion_limit = "1024"]
33

4-
#[cfg(feature = "server")]
5-
mod convert;
64
pub mod pb;
75

8-
#[cfg(feature = "server")]
9-
mod server;
10-
11-
#[cfg(feature = "server")]
12-
pub use crate::server::Server;
6+
cfg_if::cfg_if! {
7+
if #[cfg(feature = "server")] {
8+
mod convert;
9+
mod server;
10+
pub use server::Server;
11+
pub use server::NotificationStream;
12+
}
13+
}
1314

1415
#[cfg(test)]
1516
mod test;

cln-rpc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ target/${RUST_PROFILE}/examples/cln-plugin-reentrant: ${CLN_RPC_SOURCES} plugins
1818
cargo build ${CARGO_OPTS} --example cln-plugin-reentrant
1919

2020

21-
cln-rpc-all: ${CLN_RPC_GEN_ALL} ${CLN_RPC_EXAMPLES}
21+
cln-rpc-all: ${CLN_RPC_GENALL} ${CLN_RPC_EXAMPLES}

common/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ common/test/run-splice_script: \
118118
common/test/run-trace: \
119119
common/amount.o \
120120
common/memleak.o \
121+
common/pseudorand.o \
121122
common/trace.o \
122123
wire/fromwire.o \
123124
wire/towire.o

common/test/run-trace.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ int main(int argx, char *argv[])
1313
common_setup(argv[0]);
1414

1515
/* Create a bunch of nested spans to emit. */
16-
for(int i=0; i<25000; i++) {
16+
for(int i=0; i<2500000; i++) {
1717
trace_span_start("a", &a);
18+
trace_span_tag(&a, "method", "getrawblockbyheight");
1819
trace_span_start("b", &b);
20+
trace_span_tag(&b, "method", "getrawblockbyheight");
1921

2022
trace_span_start("c", &c);
23+
trace_span_tag(&c, "method", "getrawblockbyheight");
2124
trace_span_end(&c);
2225

2326
trace_span_end(&b);
2427

2528
trace_span_start("d", &d);
29+
trace_span_tag(&d, "method", "getrawblockbyheight");
2630
trace_span_end(&d);
2731

2832
trace_span_end(&a);

0 commit comments

Comments
 (0)