Difference between revisions of "Talk:Set up a Cardano ITN staking pool"

From Organic Design
(block out too)
m (Slots and blocks)
Line 28: Line 28:
 
</source>
 
</source>
 
:'''Answered:''' Being elected as a slot winner gives you the right to create a block, but new blocks are required far less frequently than every slot. The reward is for creating a block, not for simply being elected the slot winner. --[[User:Nad|Nad]] ([[User talk:Nad|talk]]) 17:16, 31 December 2019 (UTC)
 
:'''Answered:''' Being elected as a slot winner gives you the right to create a block, but new blocks are required far less frequently than every slot. The reward is for creating a block, not for simply being elected the slot winner. --[[User:Nad|Nad]] ([[User talk:Nad|talk]]) 17:16, 31 December 2019 (UTC)
 +
 +
== Monitoring ==
 +
{{quote|I see, well, I don't restart based on blockheight, but rather on either one of these messages appearing in the log (egrep): WARN request timed out or failed unexpectedly\, error\: Error\(Elapsed\)\, request\: GetHeadersRange\, task or WARN blockchain is not moving up|STR8}}

Revision as of 17:02, 16 January 2020

IPs with multiple connections

Some people have been saying that nodes with multiple connections are causing a lot of trouble and are blocking them with the following script. You need to install ufw and enable it, you can see the current rules with the status command, and clear them all with reset.

#!/bin/bash
netstat -tupan | grep jor | grep EST | awk '{print $5}'  > tmp
IPS=$(sort tmp | uniq -d | cut -d ':' -f1)
for IP in $IPS; do
  ufw deny from $IP to any
  ufw deny out from any to $IP
done
Apparently only blocking 5 or more connections is good

Slots and blocks

One thing I don't understand is that if there's 43,200 slots per epoch, then shouldn't a pool with 1% of the total stake be winning an average of 432 slots per epoch? In reality pools with around 1% stake seem to be winning about 43 slots... I asked the community here in this redit thread. The average time between new slots as shown by the pool API seems to be about 30s which I found by parsing the sentinel log with this perl snippet:

open LOG, '<', 'sentinel.log';
my $n = 0;
my $t = 0;
while(<LOG>) {
	if( /^\[\d+\/(\d+)\] Epoch:/ ) {
		$n++;
		$t += $1;
		print "$1, " . ($t/$n) . "\n";
	}
}
close LOG;
Answered: Being elected as a slot winner gives you the right to create a block, but new blocks are required far less frequently than every slot. The reward is for creating a block, not for simply being elected the slot winner. --Nad (talk) 17:16, 31 December 2019 (UTC)

Monitoring

Quote.pngI see, well, I don't restart based on blockheight, but rather on either one of these messages appearing in the log (egrep): WARN request timed out or failed unexpectedly\, error\: Error\(Elapsed\)\, request\: GetHeadersRange\, task or WARN blockchain is not moving up
— STR8