From 0b150898a97e722881f3e9498ad08bdeaf3457a3 Mon Sep 17 00:00:00 2001 From: Decho Kocharin Date: Thu, 20 Jun 2024 12:10:34 +0700 Subject: [PATCH] Update ClusterConfig.cs --- src/Miningcore/Configuration/ClusterConfig.cs | 279 +----------------- 1 file changed, 11 insertions(+), 268 deletions(-) diff --git a/src/Miningcore/Configuration/ClusterConfig.cs b/src/Miningcore/Configuration/ClusterConfig.cs index 173f01e77..705d5e25a 100644 --- a/src/Miningcore/Configuration/ClusterConfig.cs +++ b/src/Miningcore/Configuration/ClusterConfig.cs @@ -18,7 +18,7 @@ public enum CoinFamily { [EnumMember(Value = "alephium")] Alephium, - + [EnumMember(Value = "beam")] Beam, @@ -27,7 +27,7 @@ public enum CoinFamily [EnumMember(Value = "conceal")] Conceal, - + [EnumMember(Value = "cryptonote")] Cryptonote, @@ -39,6 +39,9 @@ public enum CoinFamily [EnumMember(Value = "ethereum")] Ethereum, + + [EnumMember(Value = "handshake")] + Handshake, [EnumMember(Value = "kaspa")] Kaspa, @@ -133,12 +136,6 @@ public abstract partial class CoinTemplate [JsonProperty(Order = -9)] public string Telegram { get; set; } - /// - /// Github Link - /// - [JsonProperty(Order = -9)] - public string Github { get; set; } - /// /// Arbitrary extension data /// @@ -159,6 +156,7 @@ public abstract partial class CoinTemplate {CoinFamily.Equihash, typeof(EquihashCoinTemplate)}, {CoinFamily.Ergo, typeof(ErgoCoinTemplate)}, {CoinFamily.Ethereum, typeof(EthereumCoinTemplate)}, + {CoinFamily.Handshake, typeof(BitcoinTemplate)}, {CoinFamily.Kaspa, typeof(KaspaCoinTemplate)}, {CoinFamily.Nexa, typeof(BitcoinTemplate)}, {CoinFamily.Progpow, typeof(ProgpowCoinTemplate)}, @@ -182,10 +180,6 @@ public enum BitcoinSubfamily //Florincoin, } -public partial class AlephiumCoinTemplate : CoinTemplate -{ -} - public partial class BitcoinTemplate : CoinTemplate { public class BitcoinNetworkParams @@ -227,9 +221,6 @@ public class BitcoinNetworkParams [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool HasSmartNodes { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasSmartNodes { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool HasBrokenSendMany { get; set; } = false; @@ -237,29 +228,14 @@ public class BitcoinNetworkParams public bool HasFounderFee { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasFounderReward { get; set; } - - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool HasMinerFund { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool HasCommunityAddress { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasCoinbaseDevReward { get; set; } - - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasProofOfGameplayAddress { get; set; } - - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasDevFundAddress { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool HasFoundation { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasFounderValue { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] [DefaultValue(1.0d)] public double ShareMultiplier { get; set; } = 1.0d; @@ -279,9 +255,6 @@ public class BitcoinNetworkParams [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public JToken BlockTemplateRpcExtraParams { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool HasMWEB { get; set; } - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public Dictionary Networks { get; set; } @@ -432,6 +405,9 @@ public enum CryptonightHashType [EnumMember(Value = "cn-xao")] CryptonightXAO, + [EnumMember(Value = "flex")] + Flex, + [EnumMember(Value = "gr")] Ghostrider, @@ -665,240 +641,6 @@ public partial class ErgoCoinTemplate : CoinTemplate { } -public enum CryptonoteSubfamily -{ - [EnumMember(Value = "none")] - None, -} - -public enum CryptonightHashType -{ - [EnumMember(Value = "randomx")] - RandomX, - - [EnumMember(Value = "randomarq")] - RandomARQ, - - [EnumMember(Value = "cn0")] - Cryptonight0, - - [EnumMember(Value = "cn1")] - Cryptonight1, - - [EnumMember(Value = "cn2")] - Cryptonight2, - - [EnumMember(Value = "cn-half")] - CryptonightHalf, - - [EnumMember(Value = "cn-double")] - CryptonightDouble, - - [EnumMember(Value = "cn-r")] - CryptonightR, - - [EnumMember(Value = "cn-rto")] - CryptonightRTO, - - [EnumMember(Value = "cn-rwz")] - CryptonightRWZ, - - [EnumMember(Value = "cn-zls")] - CryptonightZLS, - - [EnumMember(Value = "cn-ccx")] - CryptonightCCX, - - [EnumMember(Value = "cn-gpu")] - CryptonightGPU, - - [EnumMember(Value = "cn-fast")] - CryptonightFast, - - [EnumMember(Value = "cn-xao")] - CryptonightXAO, - - [EnumMember(Value = "gr")] - Ghostrider, - - [EnumMember(Value = "cn_lite0")] - CryptonightLite0, - - [EnumMember(Value = "cn_lite1")] - CryptonightLite1, - - [EnumMember(Value = "cn_heavy")] - CryptonightHeavy, - - [EnumMember(Value = "cn_heavy_xhv")] - CryptonightHeavyXHV, - - [EnumMember(Value = "cn_heavy_tube")] - CryptonightHeavyTube, - - [EnumMember(Value = "cn_pico")] - CryptonightPico, - - [EnumMember(Value = "argon_chukwa")] - ArgonCHUKWA, - - [EnumMember(Value = "argon_chukwa_v2")] - ArgonCHUKWAV2, - - [EnumMember(Value = "argon_wrkz")] - ArgonWRKZ, -} - -public partial class ConcealCoinTemplate : CoinTemplate -{ - [JsonProperty(Order = -7, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - [DefaultValue(ConcealSubfamily.None)] - [JsonConverter(typeof(StringEnumConverter), true)] - public ConcealSubfamily Subfamily { get; set; } - - /// - /// Broader Cryptonight hash family - /// - [JsonConverter(typeof(StringEnumConverter), true)] - [JsonProperty(Order = -5)] - public CryptonightHashType Hash { get; set; } - - /// - /// Set to 0 for automatic selection from blobtemplate - /// - [JsonProperty(Order = -4, DefaultValueHandling = DefaultValueHandling.Include)] - public int HashVariant { get; set; } - - /// - /// Conceal network hashrate = `Difficulty / DifficultyTarget` - /// See: parameter -> DIFFICULTY_TARGET in src/CryptoNoteConfig.h - /// - public ulong DifficultyTarget { get; set; } - - /// - /// Smallest unit for Blockreward formatting - /// - public decimal SmallestUnit { get; set; } - - /// - /// Prefix of a valid address - /// See: parameter -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/CryptoNoteConfig.h - /// - public ulong AddressPrefix { get; set; } - - /// - /// Prefix of a valid testnet-address - /// See: parameter -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/CryptoNoteConfig.h - /// - public ulong AddressPrefixTestnet { get; set; } - - /// - /// Prefix of a valid integrated address - /// See: parameter -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/CryptoNoteConfig.h - /// - public ulong AddressPrefixIntegrated { get; set; } - - /// - /// Prefix of a valid integrated testnet-address - /// See: parameter -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/CryptoNoteConfig.h - /// - public ulong AddressPrefixIntegratedTestnet { get; set; } - - /// - /// Fraction of block reward, the pool really gets to keep - /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - [DefaultValue(1.0d)] - public decimal BlockrewardMultiplier { get; set; } -} - -public partial class CryptonoteCoinTemplate : CoinTemplate -{ - [JsonProperty(Order = -7, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - [DefaultValue(CryptonoteSubfamily.None)] - [JsonConverter(typeof(StringEnumConverter), true)] - public CryptonoteSubfamily Subfamily { get; set; } - - /// - /// Broader Cryptonight hash family - /// - [JsonConverter(typeof(StringEnumConverter), true)] - [JsonProperty(Order = -5)] - public CryptonightHashType Hash { get; set; } - - /// - /// Set to 0 for automatic selection from blobtemplate - /// - [JsonProperty(Order = -4, DefaultValueHandling = DefaultValueHandling.Include)] - public int HashVariant { get; set; } - - /// - /// Smallest unit for Blockreward formatting - /// - public decimal SmallestUnit { get; set; } - - /// - /// Prefix of a valid address - /// See: namespace config -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefix { get; set; } - - /// - /// Sub Prefix of a valid sub address - /// See: namespace config -> CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong SubAddressPrefix { get; set; } - - /// - /// Prefix of a valid testnet-address - /// See: namespace config -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefixTestnet { get; set; } - - /// - /// Sub Prefix of a valid testnet-address - /// See: namespace config -> CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong SubAddressPrefixTestnet { get; set; } - - /// - /// Prefix of a valid stagenet-address - /// See: namespace config -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefixStagenet { get; set; } - - /// - /// Sub Prefix of a valid stagenet-address - /// See: namespace config -> CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong SubAddressPrefixStagenet { get; set; } - - /// - /// Prefix of a valid integrated address - /// See: namespace testnet -> CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefixIntegrated { get; set; } - - /// - /// Prefix of a valid integrated stagenet-address - /// See: namespace testnet -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefixIntegratedStagenet { get; set; } - - /// - /// Prefix of a valid integrated testnet-address - /// See: namespace testnet -> CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX in src/cryptonote_config.h - /// - public ulong AddressPrefixIntegratedTestnet { get; set; } - - /// - /// Fraction of block reward, the pool really gets to keep - /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - [DefaultValue(1.0d)] - public decimal BlockrewardMultiplier { get; set; } -} - public enum EthereumSubfamily { [EnumMember(Value = "none")] @@ -939,6 +681,7 @@ public enum PayoutScheme SOLO = 3, PPS = 4, PPBS = 5, + PPLNSBF = 6, } public partial class ClusterLoggingConfig @@ -1173,7 +916,7 @@ public partial class ClusterPaymentProcessingConfig /// /// Indentifier used in coinbase transactions to identify the pool /// - public string CoinbaseString { get; set; } + public string CoinbaseString { get; set; } } public partial class PersistenceConfig