Last active
April 21, 2022 05:22
-
-
Save ribasushi/53b7383aeb6e6f9b030210f4d64351d5 to your computer and use it in GitHub Desktop.
Recommended miner settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# During space-race-1 we tuned the dealbots frequency to not overwhelm the miners | |
# With space-race-2 underway your miner will be negotiating deals with a number of | |
# clients, who lack coordination among themselves. Therefore it is *very strongly* | |
# recommended to tune your miner parameters based on the sealing capacity you already | |
# known from space-race-1 | |
# | |
# The numbers below are the bare minimum for a single-box, non-gpu miner, and are | |
# very conservative safe numbers. No doubt your miner can do better so you can bring | |
# these numbers up. But! Do not dial them too high: if you lose sectors due to an | |
# unresponsive miner, your clients will be... sad. | |
[Sealing] | |
MaxWaitDealsSectors = 3 | |
MaxSealingSectors = 3 | |
MaxSealingSectorsForDeals = 0 | |
WaitDealsDelay = "9h0m0s" | |
[Dealmaking] | |
# This number is critical - the miner will not accept any deal that starts earlier | |
# than the specified time. It equals the sum of | |
# - WaitDealsDelay above | |
# - The amount of time it takes your rig to go from Packing to Proving | |
# - Any additional time you want to allow for contingencies | |
# A conservative number of 24h is ok: clients expect this. Also if you seal the deal | |
# faster - they will be able to retrieve it before the official deal start!!! | |
ExpectedSealDuration = "24h0m0s" | |
# While we recommend trying to accept deals from anyone, it is good to have an | |
# "emergency valve" to keep some bad actors out. By using the short program included | |
# you do not have to even restart your miner: just edit the script and lotus will know | |
Filter = "/absolute/path/to/below/dealfilter.pl" | |
# Make sure these 4 are enabled | |
ConsiderOnlineStorageDeals = true | |
ConsiderOfflineStorageDeals = true | |
ConsiderOnlineRetrievalDeals = true | |
ConsiderOfflineRetrievalDeals = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use 5.014; | |
# Uncomment this to lock down the miner entirely | |
#exit 1 | |
# A list of wallets you do not want to deal with | |
# For example this enty will prevent a shady ribasushi | |
# character from storing things on your miner | |
my $denylist = { map {( $_ => 1 )} ( | |
"t3vxr6utzqjobnjnhi5gwn7pqoqstw7nrh4kchft6tzb2e7xorwvj5f3tg3du3kedadtkxvyp4jakf3zdd4iaa", | |
)}; | |
use JSON::PP 'decode_json'; | |
my $deal = eval { decode_json(do{ local $/; <> }) }; | |
if( ! defined $deal ) { | |
print "Deal proposal JSON parsing failed: $@"; | |
exit 1; | |
} | |
# Artificially limit deal start time to work around https://github.com/filecoin-project/lotus/issues/3929 | |
# 1598306400 is the unix-time of "block 0" in the network | |
my $max_days_before_start = 7; | |
if( | |
1598306400 + $deal->{Proposal}{StartEpoch} * 30 | |
> | |
time() + 60 * 60 * 24 * $max_days_before_start | |
) { | |
print "Deal from client wallet $deal->{Proposal}{Client} begins more than $max_days_before_start days in the future, I do not like that"; | |
exit 1; | |
} | |
if( $denylist->{$deal->{Proposal}{Client}} ) { | |
print "Deals from client wallet $deal->{Proposal}{Client} are not welcome"; | |
exit 1; | |
} | |
exit 0; |
Pencab
commented
Jan 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment