Skip to content

Commit 0ebf7b3

Browse files
committed
Assortment of fixes:
* typo in node healthcheck * update docker down instructions with volumes removal * print more useful errors when node fails to start * support for GB and TB in addition to G and T in farmer's `--plot-size`
1 parent 40d9941 commit 0ebf7b3

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

Dockerfile-node

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN \
4545

4646
HEALTHCHECK CMD curl \
4747
-H "Content-Type: application/json" \
48-
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }" \
48+
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }' \
4949
-f "http://localhost:9933"
5050

5151
COPY --from=0 /code/subspace-node /subspace-node

crates/subspace-farmer/src/bin/subspace-farmer/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ enum Command {
5757
}
5858

5959
fn parse_human_readable_size(s: &str) -> Result<u64, std::num::ParseIntError> {
60-
const SUFFIXES: &[(&str, u64)] = &[("G", 10u64.pow(9)), ("T", 10u64.pow(12))];
60+
const SUFFIXES: &[(&str, u64)] = &[
61+
("G", 10u64.pow(9)),
62+
("GB", 10u64.pow(9)),
63+
("T", 10u64.pow(12)),
64+
("TB", 10u64.pow(12)),
65+
];
6166

6267
SUFFIXES
6368
.iter()

crates/subspace-node/src/bin/subspace-node.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,11 @@ fn main() -> std::result::Result<(), Error> {
268268
primary_chain_node_config,
269269
true,
270270
)
271-
.map_err(|_| {
272-
sc_service::Error::Other("Failed to build a full subspace node".into())
271+
.map_err(|error| {
272+
sc_service::Error::Other(format!(
273+
"Failed to build a full subspace node: {}",
274+
error
275+
))
273276
})?
274277
};
275278

@@ -290,10 +293,11 @@ fn main() -> std::result::Result<(), Error> {
290293
&secondary_chain_cli,
291294
tokio_handle,
292295
)
293-
.map_err(|_| {
294-
sc_service::Error::Other(
295-
"Failed to create secondary chain configuration".into(),
296-
)
296+
.map_err(|error| {
297+
sc_service::Error::Other(format!(
298+
"Failed to create secondary chain configuration: {}",
299+
error
300+
))
297301
})?;
298302

299303
let secondary_chain_full_node_fut = cirrus_node::service::new_full(

docs/farming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Now follow installation guide.
294294

295295
### Docker
296296

297-
In case of Docker setup run `docker-compose down` (and manually delete custom directories if you have specified them).
297+
In case of Docker setup run `docker-compose down -v` (and manually delete custom directories if you have specified them).
298298

299299
Now follow installation guide.
300300

0 commit comments

Comments
 (0)