diff --git a/README.md b/README.md index c2103a2..887a2bd 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # Grin Nicehash Defender -Current Project Status: Beta Release +Current Project Status: + * Release 1.0 + * Community-Funded instance is running at grindefender.online Grin Nicehash Defender is a bot that Grin community members can use to help defend the Grin network. If abnormal activity is taking place the bot will rent C32 hashpower from Nicehash to increase Grin network security for the duration of the attack. What it does: - * Monitors grin network for 51% attack (choose between Grin51 and grin-health detection algorithms) + * Monitors grin network for 51% attack (Supports detection algorithms: Grin51 and grin-health) * If an attack is detected a NiceHash C32 order will be created on both EU and USA markets * While the attack is active, the order limit prices will be increased to keep miners working * After the attack ends, the two orders will be deleted @@ -18,7 +20,7 @@ How to use it: * Get NiceHash "API keys": Needs "Market place Permissions" * Set environment variables NICEHASH_API_ID and NICEHASH_API_KEY (or add to config.yml) * Clone this git project - * Install required python modules: ```pip -r requirements.txt``` + * Install required python modules: ```pip install -r requirements.txt``` * Edit "config.yml" and update settings * Run: ```python grin_nicehash_defender.py``` diff --git a/config.yml b/config.yml index 6d19e47..78ac349 100644 --- a/config.yml +++ b/config.yml @@ -9,15 +9,15 @@ # NiceHash Order Config POOL_NAME: "defender" # Must exist in "MY POOLS" NiceHash configuration and point to a C32 pool MAX_SPEED: 0.5 # kG/s - NiceHash order limit speed - ORDER_AMOUNT: 0.005 # BTC - Amount to spend (max) on an order - MAX_PRICE: 0.275 # BTC/kG/day - Never exceed this Nicehash order price bid (capitulation) + ORDER_AMOUNT: 0.002 # BTC - Amount to spend (max) on an order + MAX_PRICE: 0.375 # BTC/kG/day - Never exceed this Nicehash order price bid (capitulation) ADD_ORDER_DURATION: 10 # Minutes - Additional amount of time to mine after an attack has ended # Advanced Config VERBOSE: False # Print lots of debugging data - WARNINIG: "True" Prints NiceHash API keys!! ORDER_PRICE_ADD: 0.0005 # BTC - Amount to set order price over the absolute minimum LOOP_INTERVAL: 60 # Seconds - Sleep this long between control loop runs - CHECK_TYPE: "all" # Method of detecting an attack: + CHECK_TYPE: "all" # Method of detecting an attack: # "grin51": run the grin51 detection algorithm locally # "grin-health": use the public grin-health score service api # "file": for debugging, check for file called "./attack" diff --git a/grin51.py b/grin51.py index 9ce3916..7f4c693 100755 --- a/grin51.py +++ b/grin51.py @@ -310,7 +310,7 @@ def run(self): def main(): # A few tests - g51 = Grin51(threashold=1.01) + g51 = Grin51(threashold=1.01, min_history=1) g51.run() print("Running") print("Under Attack: {}".format(g51.under_attack))