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

From Organic Design wiki
m (Tech details)
m (Tech details)
Line 53: Line 53:
 
{{quote|Their "luck" may change soon. Because word on the street is that Jormungandr is going to change the way it bootstraps soon. So that the initial gossip nodes are NOT the same as the bootstrap peers. Which will take the bulk of the load off the IOHK peers and make your entry into the p2p network more random.|Michael Fazio}}
 
{{quote|Their "luck" may change soon. Because word on the street is that Jormungandr is going to change the way it bootstraps soon. So that the initial gossip nodes are NOT the same as the bootstrap peers. Which will take the bulk of the load off the IOHK peers and make your entry into the p2p network more random.|Michael Fazio}}
  
{{quote|Passive node started with a --secret parameter but with leader id subsequently deleted so currently not actively producing blocks, but is on stand-by i.e. so can produce blocks if i re-install the leader)|Homer J (AAA Stake Pool)}}
+
{{quote|Passive node started with a --secret parameter but with leader id subsequently deleted so currently not actively producing blocks, but is on stand-by i.e. so can produce blocks if i re-install the leader. Also I think public_id is only needed if you're trying to set up some local poldercast ring i.e. trying to get your own nodes talking to your other nodes, otherwise it doesn't help with anything and probably results in you being quarantined for longer if your node does regular restarts|Homer J (AAA Stake Pool)}}

Revision as of 11:35, 27 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

Quote.pngIn my case, when i get to 50% (i.e. 100% for 1 core) my node falls out of sync. Then my restart scripts kick in. So the process is killed and we start again.
— Michael Fazio

Optimisations

Quote.pngPart of the reason bootstrapping takes forever is because it's reading the sqlite file from disk
mkdir ram_storage && mount -t tmps -o size=1G tmpfs ./ram_storage && cp storage/* ram_storage
— Cardano Bull

Tech details

Quote.pngA little bit of extra context about the stats I added to 0.8.7
peerAvailableCnt: "52357"
peerQuarantinedCnt: "1966"
peerUnreachableCnt: "1083"

Peer Available Count: Peers you have discovered via Gossip that have a public address and you have previously connect to successfully or are yet to try.

Peer Quarantined Count: Peers you have put in the naughty list because (1) you tried to establish a connection and couldn't (2) You re-established a connection with them but their node public ID had changed for some reason.

Peer Unreachable Count: Nodes that you have found through gossip but are not advertising a public ID and hence cannot be connected to.
— Michael Fazio

Quote.pngTheir "luck" may change soon. Because word on the street is that Jormungandr is going to change the way it bootstraps soon. So that the initial gossip nodes are NOT the same as the bootstrap peers. Which will take the bulk of the load off the IOHK peers and make your entry into the p2p network more random.
— Michael Fazio

Quote.pngPassive node started with a --secret parameter but with leader id subsequently deleted so currently not actively producing blocks, but is on stand-by i.e. so can produce blocks if i re-install the leader. Also I think public_id is only needed if you're trying to set up some local poldercast ring i.e. trying to get your own nodes talking to your other nodes, otherwise it doesn't help with anything and probably results in you being quarantined for longer if your node does regular restarts
— Homer J (AAA Stake Pool)