Skip to content

Commit b899404

Browse files
authored
Merge pull request #2037 from mintlayer/allow_disabling_ledger__fix_dockerfiles
Allow disabling ledger support, fix dockerfiles
2 parents 1511a98 + 518cdab commit b899404

File tree

19 files changed

+89
-58
lines changed

19 files changed

+89
-58
lines changed

Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,6 @@ overflow-checks = true
335335
[profile.test.package.script]
336336
opt-level = 2
337337

338-
[features]
339-
tokio-console = []
340-
trezor = []
341-
ledger = []
342-
default = ["trezor", "ledger"]
343-
344338
[patch.crates-io]
345339
# Using fontconfig-parser v0.5.8 completely breaks UI in node-gui on Linux - most of the text disappears and the few
346340
# characters that remain have broken spacing, so we force the usage of v0.5.7 via "patch".

build-tools/docker/Dockerfile.builder

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Note: the base image here doesn't really matter, we just use the same one as in the "builder"
1313
# stage below.
14-
FROM rust:bookworm as source
14+
FROM rust:bookworm AS source
1515
COPY . /src
1616
RUN rm -r /src/build-tools
1717

@@ -24,7 +24,9 @@ FROM rust:bookworm AS builder
2424

2525
WORKDIR /usr/src/
2626

27-
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
27+
RUN apt-get update && \
28+
apt-get install -y ca-certificates libdbus-1-dev libusb-1.0-0-dev && \
29+
rm -rf /var/lib/apt/lists/*
2830

2931
COPY --from=source /src/ /usr/src/
3032

build-tools/docker/Dockerfile.runner-base

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# in Dockerfile.builder.
33
FROM debian:bookworm-slim
44

5-
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
5+
RUN apt-get update && \
6+
apt-get install -y gosu libdbus-1-3 libusb-1.0-0 && \
7+
rm -rf /var/lib/apt/lists/*
68

79
WORKDIR /home/mintlayer
810

build-tools/p2p-test/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
FROM rust:1.75
2-
1+
FROM rust:latest
32
WORKDIR /src/
43

54
RUN apt-get update && \
65
apt-get install -y \
7-
ca-certificates \
6+
ca-certificates libdbus-1-dev libusb-1.0-0-dev \
87
nmap procps net-tools iputils-ping dnsutils \
98
&& rm -rf /var/lib/apt/lists/*
109

build-tools/staking-test/.env

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ COMMON_NODE_DAEMON_ARGS="--create-datadir-if-missing=true $CHAIN_TYPE --rpc-bind
2424

2525
COMMON_WALLET_RPC_DAEMON_ARGS="$CHAIN_TYPE --rpc-bind-address=0.0.0.0:$WALLET_RPC_INTERNAL_PORT --rpc-username=$WALLET_RPC_USER --rpc-password=$WALLET_RPC_PWD --node-rpc-username=$NODE_RPC_USER --node-rpc-password=$NODE_RPC_PWD $COMMON_ARGS"
2626

27-
NODE_00_RPC_HOST_PORT=40000
28-
NODE_01_RPC_HOST_PORT=40001
29-
NODE_02_RPC_HOST_PORT=40002
30-
NODE_03_RPC_HOST_PORT=40003
31-
NODE_04_RPC_HOST_PORT=40004
32-
NODE_05_RPC_HOST_PORT=40005
33-
NODE_06_RPC_HOST_PORT=40006
34-
NODE_07_RPC_HOST_PORT=40007
35-
NODE_08_RPC_HOST_PORT=40008
36-
37-
WALLET_00_RPC_HOST_PORT=40100
38-
WALLET_01_RPC_HOST_PORT=40101
39-
WALLET_02_RPC_HOST_PORT=40102
40-
WALLET_03_RPC_HOST_PORT=40103
41-
WALLET_04_RPC_HOST_PORT=40104
42-
WALLET_05_RPC_HOST_PORT=40105
43-
WALLET_06_RPC_HOST_PORT=40106
44-
WALLET_07_RPC_HOST_PORT=40107
45-
WALLET_08_RPC_HOST_PORT=40108
27+
NODE_00_RPC_HOST_PORT=40100
28+
NODE_01_RPC_HOST_PORT=40101
29+
NODE_02_RPC_HOST_PORT=40102
30+
NODE_03_RPC_HOST_PORT=40103
31+
NODE_04_RPC_HOST_PORT=40104
32+
NODE_05_RPC_HOST_PORT=40105
33+
NODE_06_RPC_HOST_PORT=40106
34+
NODE_07_RPC_HOST_PORT=40107
35+
NODE_08_RPC_HOST_PORT=40108
36+
37+
WALLET_00_RPC_HOST_PORT=40200
38+
WALLET_01_RPC_HOST_PORT=40201
39+
WALLET_02_RPC_HOST_PORT=40202
40+
WALLET_03_RPC_HOST_PORT=40203
41+
WALLET_04_RPC_HOST_PORT=40204
42+
WALLET_05_RPC_HOST_PORT=40205
43+
WALLET_06_RPC_HOST_PORT=40206
44+
WALLET_07_RPC_HOST_PORT=40207
45+
WALLET_08_RPC_HOST_PORT=40208

build-tools/staking-test/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
ARG CARGO_TARGET_DIR=/src/target
2-
ARG RUST_VER=1.78
32

43
# Use a separate "source" stage so that build-tools is not copied into the builder image,
54
# while still not excluding it from the build context (it's needed to copy node_runner.sh below).
6-
FROM rust:$RUST_VER as source
5+
FROM rust:bookworm AS source
76
COPY . /src
87
RUN rm -r /src/build-tools
98

10-
FROM rust:$RUST_VER as builder
9+
FROM rust:bookworm AS builder
1110
ARG CARGO_TARGET_DIR
1211

1312
WORKDIR /src/
@@ -20,14 +19,18 @@ ARG NUM_JOBS=16
2019
# directory specified in their .cargo/config.toml).
2120
ENV CARGO_TARGET_DIR=$CARGO_TARGET_DIR
2221

22+
RUN apt-get update && \
23+
apt-get install -y libdbus-1-dev libusb-1.0-0-dev && \
24+
rm -rf /var/lib/apt/lists/*
25+
2326
RUN cargo build --release -j${NUM_JOBS} --bin node-daemon --bin wallet-cli --bin wallet-rpc-daemon
2427

2528
FROM debian:bookworm-slim
2629
ARG CARGO_TARGET_DIR
2730

2831
RUN apt-get update && \
29-
apt-get install -y dnsutils \
30-
&& rm -rf /var/lib/apt/lists/*
32+
apt-get install -y dnsutils libdbus-1-3 libusb-1.0-0 && \
33+
rm -rf /var/lib/apt/lists/*
3134

3235
RUN mkdir -p /workdir
3336
WORKDIR /workdir

build-tools/staking-test/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
# Note: node index will be added to each of these numbers to form the actual port number,
4747
# so make sure the ranges don't overlap.
4848
# These values are also hard-coded in the .env file.
49-
NODE_RPC_PORT_BASE = 40000
50-
WALLET_RPC_PORT_BASE = 40100
49+
NODE_RPC_PORT_BASE = 40100
50+
WALLET_RPC_PORT_BASE = 40200
5151

5252
# RPC username and password for node-daemon and wallet-rpc-daemon".
5353
# These values are also hard-coded in the .env file.

build-tools/staking-test/init_and_start_staking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ def create_pool_and_delegate(self, amount, portion_to_pledge):
109109
pledge_amount = MIN_POOL_PLEDGE
110110

111111
response = self.wallet.staking_create_pool(
112-
0, { "atoms": f"{pledge_amount}" }, { "atoms": "0" }, f"{margin_ratio_per_thousand}", self.address, { "in_top_x_mb" : None })
112+
0, { "atoms": f"{pledge_amount}" }, { "atoms": "0" }, f"{margin_ratio_per_thousand}",
113+
self.address, None, None, { "in_top_x_mb" : None }
114+
)
115+
113116
tx_id = response["tx_id"]
114117
tx_ids.append(tx_id)
115118

node-daemon/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ rpc-description = { path = "../rpc/description" }
1919

2020
assert_cmd.workspace = true
2121
expect-test.workspace = true
22+
23+
[features]
24+
tokio-console = ["utils/tokio-console"]

node-gui/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ tokio.workspace = true
3939
winres = "0.1"
4040

4141
[features]
42+
tokio-console = ["utils/tokio-console"]
4243
trezor = [
4344
"wallet-controller/trezor",
4445
"wallet-types/trezor",

0 commit comments

Comments
 (0)