Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/protocol/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ export class Validator {
"0"
)
.option(
"--ensure-no-loss",
"Ensures that the node only uploads bundles which can be fully rewarded by the protocol.",
true
"--ensure-no-loss [value]",
"Ensures that the node only uploads bundles which can be fully rewarded by the protocol. Set to 'false' to disable [default = true]",
"true"
)
.option(
"--scale-ensure-no-loss <number>",
Expand Down
2 changes: 1 addition & 1 deletion common/protocol/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PROTOCOL_VERSION = "1.5.0";
export const PROTOCOL_VERSION = "1.6.1";
5 changes: 3 additions & 2 deletions tools/kysor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
},
"bin": "./dist/src/index.js",
"pkg": {
"scripts": "./dist/index.js",
"scripts": "./dist/src/index.js",
"assets": [
"../../node_modules/classic-level/**/*"
"../../node_modules/classic-level/**/*",
"../../node_modules/axios/**/*"
],
"targets": [
"latest-linux-x64",
Expand Down
6 changes: 3 additions & 3 deletions tools/kysor/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ start
"The gas price the node should use to calculate transaction fees, this value will be loaded by default based on the chain id"
)
.option(
"--ensure-no-loss",
"Ensures that the node only uploads bundles which can be fully rewarded by the protocol.",
true
"--ensure-no-loss [value]",
"Ensures that the node only uploads bundles which can be fully rewarded by the protocol. Set to 'false' to disable [default = true]",
"true"
)
.option(
"--scale-ensure-no-loss <number>",
Expand Down
16 changes: 14 additions & 2 deletions tools/kysor/src/kysor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,23 @@ export const run = async (options: any) => {
`${versionHome}`,
];

if (JSON.parse(options.ensureNoLoss)) {
// Handle ensure-no-loss option: support --ensure-no-loss false to disable
// Normalize the value to handle both string and boolean types
let ensureNoLossValue: string;
if (options.ensureNoLoss === undefined) {
ensureNoLossValue = "true";
} else if (typeof options.ensureNoLoss === "boolean") {
ensureNoLossValue = options.ensureNoLoss ? "true" : "false";
} else {
ensureNoLossValue = String(options.ensureNoLoss).toLowerCase();
}

if (ensureNoLossValue === "false") {
args.push("--ensure-no-loss");
args.push("false");
} else {
// For true or default case, just pass the flag (defaults to true)
args.push("--ensure-no-loss");
args.push(`${false}`);
}

if (options.scaleEnsureNoLoss > 0) {
Expand Down
Loading