MrWonderland's avatar
MrWonderland
npub1tn0q...rk3w
MrWonderland's avatar
MrWonderland 1 week ago
Btw of anyone out there wants to run a FCMP-Testnet-Node (and you're using NixOS), you can use this: ~~~ # monero-fcmp-testnet.nix { flake.modules.nixos.monero-fcmp-testnet = { config, lib, pkgs, ... }: let cfg = config.services.monero-fcmp-testnet; fcmpMoneroBin = pkgs.stdenv.mkDerivation rec { pname = "monero-fcmp-testnet-bin"; version = "0.19.0.0-beta.1.1"; src = pkgs.fetchurl { url = "https://github.com/seraphis-migration/monero/releases/download/v${version}/linux_x64_beta-v1.1.zip"; hash = "sha256-od8taKNOBUJ7XH8bCQn+yO5JR5FDM+ldVBEfukPhGTw="; }; nativeBuildInputs = [ pkgs.unzip pkgs.gnutar pkgs.bzip2 pkgs.autoPatchelfHook ]; buildInputs = [ pkgs.stdenv.cc.cc.lib pkgs.zlib pkgs.openssl pkgs.boost pkgs.libsodium pkgs.zeromq pkgs.readline pkgs.unbound pkgs.miniupnpc pkgs.hidapi pkgs.libusb1 pkgs.protobuf pkgs.udev ]; unpackPhase = '' runHook preUnpack mkdir source cd source unzip -q "$src" inner_tar="$(find . -type f -name 'monero-x86_64-linux-gnu-*.tar.bz2' | head -n 1)" if [ -z "$inner_tar" ]; then echo "Could not find nested Monero tarball inside release zip" find . -maxdepth 5 -type f exit 1 fi mkdir extracted tar -xjf "$inner_tar" -C extracted package_root="$(find extracted -mindepth 1 -maxdepth 1 -type d | head -n 1)" if [ -z "$package_root" ]; then echo "Could not find extracted Monero package root" find extracted -maxdepth 3 -type f exit 1 fi cd "$package_root" runHook postUnpack ''; installPhase = '' runHook preInstall mkdir -p "$out/bin" mkdir -p "$out/share/doc/monero-fcmp-testnet" for name in \ monerod \ monero-wallet-cli \ monero-wallet-rpc \ monero-blockchain-ancestry \ monero-blockchain-depth \ monero-blockchain-export \ monero-blockchain-import \ monero-blockchain-mark-spent-outputs \ monero-blockchain-prune \ monero-blockchain-prune-known-spent-data \ monero-blockchain-stats \ monero-blockchain-usage \ monero-gen-ssl-cert \ monero-gen-trusted-multisig do if [ -f "./$name" ]; then install -Dm755 "./$name" "$out/bin/$name" fi done for doc in README.md LICENSE ANONYMITY_NETWORKS.md; do if [ -f "./$doc" ]; then install -Dm644 "./$doc" "$out/share/doc/monero-fcmp-testnet/$doc" fi done test -x "$out/bin/monerod" test -x "$out/bin/monero-wallet-cli" test -x "$out/bin/monero-wallet-rpc" runHook postInstall ''; meta = { description = "FCMP++ and Carrot beta stressnet v1.1 Monero binaries"; homepage = "https://github.com/seraphis-migration/monero/releases/tag/v${version}"; mainProgram = "monerod"; platforms = [ "x86_64-linux" ]; sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; }; }; monerodConfig = pkgs.writeText "monero-fcmp-testnet.conf" '' testnet=1 non-interactive=1 data-dir=${cfg.dataDir} log-level=${toString cfg.logLevel} log-file=/dev/stdout p2p-bind-ip=${cfg.p2p.bindIp} p2p-bind-port=${toString cfg.p2p.port} rpc-bind-ip=${cfg.rpc.bindIp} rpc-bind-port=${toString cfg.rpc.port} restricted-rpc=${if cfg.rpc.restricted then "1" else "0"} ${lib.optionalString (cfg.rpc.bindIp != "127.0.0.1" && cfg.rpc.bindIp != "::1") '' confirm-external-bind=1 ''} ${lib.optionalString cfg.prune '' prune-blockchain=1 sync-pruned-blocks=1 ''} ${cfg.extraConfig} ''; in { options.services.monero-fcmp-testnet = { enable = lib.mkEnableOption "FCMP++ and Carrot beta stressnet Monero node"; package = lib.mkOption { type = lib.types.package; default = fcmpMoneroBin; description = "Package providing the FCMP++ compatible monerod binary."; }; dataDir = lib.mkOption { type = lib.types.path; default = "/var/lib/monero-fcmp-testnet"; description = '' Directory used as monerod --data-dir. This stores the blockchain database, logs, and P2P state. Mount your dedicated blockchain disk here if desired. ''; }; requireMountedDataDir = lib.mkOption { type = lib.types.bool; default = false; description = '' If true, the systemd service only starts when dataDir is a mount point. This prevents accidentally syncing the blockchain onto the root disk when an external or secondary disk is missing. ''; }; addToSystemPackages = lib.mkOption { type = lib.types.bool; default = true; description = "Whether to add the FCMP++ Monero binaries to environment.systemPackages."; }; prune = lib.mkOption { type = lib.types.bool; default = false; description = "Whether to run the daemon in pruned mode."; }; logLevel = lib.mkOption { type = lib.types.int; default = 1; description = "monerod log level."; }; openFirewall = lib.mkOption { type = lib.types.bool; default = false; description = "Whether to open the P2P port in the firewall."; }; p2p = { bindIp = lib.mkOption { type = lib.types.str; default = "0.0.0.0"; description = "P2P bind address."; }; port = lib.mkOption { type = lib.types.port; default = 28080; description = "Testnet P2P port."; }; }; rpc = { bindIp = lib.mkOption { type = lib.types.str; default = "127.0.0.1"; description = "RPC bind address."; }; port = lib.mkOption { type = lib.types.port; default = 28081; description = "Testnet RPC port."; }; restricted = lib.mkOption { type = lib.types.bool; default = true; description = "Whether to enable restricted RPC mode."; }; }; extraConfig = lib.mkOption { type = lib.types.lines; default = ""; description = "Extra monerod config lines."; }; extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; description = "Extra command-line arguments passed to monerod."; }; }; config = lib.mkIf cfg.enable { users.groups.monero-fcmp-testnet = { }; users.users.monero-fcmp-testnet = { isSystemUser = true; group = "monero-fcmp-testnet"; home = toString cfg.dataDir; createHome = true; }; systemd.tmpfiles.rules = [ "d ${toString cfg.dataDir} 0700 monero-fcmp-testnet monero-fcmp-testnet -" ]; environment.systemPackages = lib.mkIf cfg.addToSystemPackages [ cfg.package ]; networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ cfg.p2p.port ]; systemd.services.monero-fcmp-testnet = { description = "Monero FCMP++ and Carrot beta stressnet node"; after = [ "network-online.target" ]; wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; unitConfig = { RequiresMountsFor = toString cfg.dataDir; } // lib.optionalAttrs cfg.requireMountedDataDir { ConditionPathIsMountPoint = toString cfg.dataDir; }; environment = { HOME = toString cfg.dataDir; }; serviceConfig = { User = "monero-fcmp-testnet"; Group = "monero-fcmp-testnet"; ExecStart = "${cfg.package}/bin/monerod --config-file=${monerodConfig} " + lib.concatStringsSep " " cfg.extraArgs; Restart = "always"; RestartSec = 10; WorkingDirectory = toString cfg.dataDir; ReadWritePaths = [ cfg.dataDir ]; NoNewPrivileges = true; PrivateTmp = true; ProtectHome = true; ProtectSystem = "strict"; ProtectKernelTunables = true; ProtectKernelModules = true; ProtectControlGroups = true; RestrictSUIDSGID = true; }; }; }; }; } ~~~ If you're using import-tree and flake-parts you can just create a .nix file with the code above and stuff it somewhere into your dotfiles. Then just put this into your import section of the host you want to add the testnet node to: ~~~ inputs.self.modules.nixos.monero-fcmp-testnet ~~~ Last add this section to enable and configure your node: ~~~ services.monero-fcmp-testnet = { enable = true; # You can customize the blockchain/data directory. # dataDir = "/srv/monero"; # Prevent syncing onto the blockchain/data disk if the disk is not mounted. # requireMountedDataDir = true; # Open only the P2P testnet port, not RPC. openFirewall = true; # You can enable pruning # prune = true; # Configure the loglevel # 2 is recommended for submitting issues # logLevel = 2; rpc = { bindIp = "127.0.0.1"; port = 28081; restricted = false; }; p2p = { bindIp = "0.0.0.0"; port = 28080; }; # extraConfig = '' # # Add FCMP/testnet-specific peers or daemon options here if needed. # ''; }; ~~~
MrWonderland's avatar
MrWonderland 1 month ago
The Privacy Hypocrite Shame List Companies that market themselves as privacy-focused but refuse to accept Monero โ€” the only truly private money. Share it and make it known. Let's bully those hypocrites to put their money where their mouth is ๐Ÿ˜ Big thanks to Xenu (the antimoonboy) and Monerica! #XMR #Monero #PrivacyHypocrites #MakePrivacyPrivateAgain #CallToAction
โ†‘