From 307f8ab2d998729535ef56d716905dd79b1b8273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Thu, 21 May 2026 16:30:14 +0200 Subject: [PATCH 1/2] feat: add reserve capacity doubling info to status output --- src/command/status.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/command/status.ts b/src/command/status.ts index cdb81cd6..05bedb10 100644 --- a/src/command/status.ts +++ b/src/command/status.ts @@ -115,6 +115,14 @@ export class Status extends RootCommand implements LeafCommand { ' GB)', ), ) + const reserveState = await this.bee.getReserveState() + const reserveCapacityDoubling = reserveState.reserveCapacityDoubling + this.console.all( + createKeyValue( + 'Reserve capacity doubling', + `${reserveCapacityDoubling} (${2 ** reserveCapacityDoubling} neighbourhood(s))`, + ), + ) this.console.all('') this.console.all(chalk.bold('Redistribution')) const redistributionState = await this.bee.getRedistributionState() From d62f3d7eb3a07191ff79f9a78cc30f4f9811c471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Fri, 22 May 2026 14:39:44 +0200 Subject: [PATCH 2/2] feat: add warning prompt when stake amount is low --- src/command/root-command/command-config.ts | 2 +- src/command/stake/deposit.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/command/root-command/command-config.ts b/src/command/root-command/command-config.ts index 4b66619f..e598b2fd 100644 --- a/src/command/root-command/command-config.ts +++ b/src/command/root-command/command-config.ts @@ -1,4 +1,4 @@ -import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs' +import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs' import { homedir, platform } from 'os' import { join } from 'path' import { exit } from 'process' diff --git a/src/command/stake/deposit.ts b/src/command/stake/deposit.ts index 84f56df8..8c31fc17 100644 --- a/src/command/stake/deposit.ts +++ b/src/command/stake/deposit.ts @@ -69,6 +69,20 @@ export class Deposit extends RootCommand implements LeafCommand { } if (!this.quiet && !this.yes) { + const reserveState = await this.bee.getReserveState() + const reserveCapacityDoubling = reserveState.reserveCapacityDoubling + + if (amount.eq(BZZ.fromDecimalString('10')) && reserveCapacityDoubling > 0) { + this.yes = await this.console.confirm( + `It is recommended to stake ${ + 10 * 2 ** reserveCapacityDoubling + } xBZZ with a doubled node. Countinue with 10 xBZZ anyway?`, + ) + } + + if (!this.yes) { + exit(1) + } this.yes = await this.console.confirm( `You are about to deposit a non-refundable stake of ${amount.toDecimalString()} xBZZ, are you sure you wish to proceed?`, )