From 415559f731837f8e6164f0e2c842bab3f9feec86 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 17 Nov 2026 16:33:23 +0100 Subject: [PATCH] Added ability to configure LXMF destination stamp value --- nomadnet/NomadNetworkApp.py | 8 +++++++- nomadnet/ui/textui/Guide.py | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py index d2ba4df..cb379da 100644 --- a/nomadnet/NomadNetworkApp.py +++ b/nomadnet/NomadNetworkApp.py @@ -150,6 +150,7 @@ class NomadNetworkApp: self.notify_on_new_message = True self.compose_markdown = True + self.lxmf_stamp_value = None self.lxmf_max_propagation_size = None self.lxmf_max_sync_size = None self.lxmf_max_incoming_size = None @@ -389,7 +390,7 @@ class NomadNetworkApp: for destination_hash in self.ignored_list: self.message_router.ignore_destination(destination_hash) - self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost) + self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost, stamp_value=self.lxmf_stamp_value) if not self.accept_invalid_stamps: self.message_router.enforce_stamps() @@ -870,6 +871,11 @@ class NomadNetworkApp: value = self.config["client"].as_bool(option) self.enable_client = value + if option == "stamp_value": + value = self.config["client"].as_float("stamp_value") + if value < 1: value = 1 + self.lxmf_stamp_value = RNS.Stamps.quantize_cost(value) + if option == "downloads_path": value = self.config["client"]["downloads_path"] self.downloads_path = os.path.expanduser(value) diff --git a/nomadnet/ui/textui/Guide.py b/nomadnet/ui/textui/Guide.py index a204272..3dc0a56 100644 --- a/nomadnet/ui/textui/Guide.py +++ b/nomadnet/ui/textui/Guide.py @@ -1018,6 +1018,12 @@ The number of minutes between each automatic sync. The default is equal to 6 hou On low-bandwidth networks, it can be useful to limit the amount of messages downloaded in each sync. The default is 8. Set to 0 to download all available messages every time a sync occurs. < +>>> +`!stamp_value = 25.0`! +>>>> +The target stamp value for your LXMF destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though. +< + >>> `!required_stamp_cost = None`! >>>> @@ -1215,6 +1221,18 @@ Determines whether the node server should be started on launch. Must be a boolea Defines what the announced name of the node should be. < +>>> +`!stamp_value = 25.0`! +>>>> +The target stamp value for your node destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though. +< + +>>> +`!link_cost = 17.8`! +>>>> +The link stamp cost required for other peers to connect to your node. The default is a relatively high value, that should deter most automated scraping and misuse, but you can set it even higher, if you wish, or lower it to allow connecting more easily. +< + >>> `!announce_at_start = yes`! >>>>