user1142: I just saw this tweet: https://twitter.com/SmaugPool/status/1428010540711006218

Next epoch (285) should be great at 109% luck with 19 leader slots

At the time the tweet was made, epoch 284 was still in progress.
How is it possible that the stake pool owner already knows how many slots/blocks he gets assigned in the next epoch? Can this information be retrieved from the blockchain?
Also wouldn't this mean that one could always check which pool has the most blocks assigned and then switch to that pool for the next epoch?

user2042: 
Also wouldn't this mean that one could always check which pool has the most blocks assigned and then switch to that pool for the next epoch?

The number of blocks calculated for the next epoch is, among other things, based on a snapshot of the delegations to each pool taken at the beginning of the current epoch.
This means that if you were not staked with the pool at the beginning of the current epoch, your stake will not be earning rewards for the coming epoch (the epoch during which the calculated number of blocks will be minted).
If you delegate to a pool once they know how many blocks are going to be minted in epoch X (i.e. within 36 hours prior to epoch X starting), your stake will be part of the snapshot that helps determine how many blocks will be minted in epoch X+1, and it is during epoch X+1 that your stake will start earning rewards.

user12: Yes, the slots allotted to a pool for minting in the next epoch can be calculated (36 Hours before the epoch). Cncli is a community tool (available at github repository) made by, Andrew Westberg (@AndrewWestberg-BCSH), Michael Fazio, Andrea Callea, Thomas Diesler. The details provided are quite exhaustive. Sample output of the leader log command is below
{
 "status": "ok",
 "epoch": 227,
 "epochNonce":   XXX",
 poolId":    --------",
 "sigma": 0.0028306163817569175,
 "d": 0.5,
 "assignedSlots": [
 ...
 {
     "slot": 13083245,
     "slotInEpoch": 382445,
     "at": "2020-11-05T23:58:56-08:00"
 },
 {
      "slot": 13106185,
      "slotInEpoch": 405385,
      "at": "2020-11-06T06:21:16-08:00"
 }
      ...
 ]
}

The selection of slot leader mechanism is explained nicely in NerdOut

1142: <p>I just saw this tweet: <a href="https://twitter.com/SmaugPool/status/1428010540711006218" rel="noreferrer">https://twitter.com/SmaugPool/status/1428010540711006218</a></p>
<blockquote>
<p>Next epoch (285) should be great at 109% luck with 19 leader slots</p>
</blockquote>
<p>At the time the tweet was made, epoch 284 was still in progress.</p>
<p>How is it possible that the stake pool owner already knows how many slots/blocks he gets assigned in the next epoch? Can this information be retrieved from the blockchain?</p>
<p>Also wouldn't this mean that one could always check which pool has the most blocks assigned and then switch to that pool for the next epoch?</p>
 2042: <blockquote>
<p>Also wouldn't this mean that one could always check which pool has the most blocks assigned and then switch to that pool for the next epoch?</p>
</blockquote>
<p>The number of blocks calculated for the next epoch is, among other things, based on a snapshot of the delegations to each pool taken at the beginning of the current epoch.</p>
<p>This means that if you were not staked with the pool at the beginning of the current epoch, your stake will not be earning rewards for the coming epoch (the epoch during which the calculated number of blocks will be minted).</p>
<p>If you delegate to a pool once they know how many blocks are going to be minted in epoch X (i.e. within 36 hours prior to epoch X starting), your stake will be part of the snapshot that helps determine how many blocks will be minted in epoch X+1, and it is during epoch X+1 that your stake will start earning rewards.</p>
 12: <p>Yes, the slots allotted to a pool for minting in the next epoch can be calculated (36 Hours before the epoch). Cncli is a community tool (available at <a href="https://github.com/AndrewWestberg/cncli" rel="noreferrer">github repository</a>) made by, Andrew Westberg (@AndrewWestberg-BCSH), Michael Fazio, Andrea Callea, Thomas Diesler. The details provided are quite exhaustive. Sample output of the leader log command is below</p>
<pre><code>{
 &quot;status&quot;: &quot;ok&quot;,
 &quot;epoch&quot;: 227,
 &quot;epochNonce&quot;:   XXX&quot;,
 poolId&quot;:    --------&quot;,
 &quot;sigma&quot;: 0.0028306163817569175,
 &quot;d&quot;: 0.5,
 &quot;assignedSlots&quot;: [
 ...
 {
     &quot;slot&quot;: 13083245,
     &quot;slotInEpoch&quot;: 382445,
     &quot;at&quot;: &quot;2020-11-05T23:58:56-08:00&quot;
 },
 {
      &quot;slot&quot;: 13106185,
      &quot;slotInEpoch&quot;: 405385,
      &quot;at&quot;: &quot;2020-11-06T06:21:16-08:00&quot;
 }
      ...
 ]
}
</code></pre>
<p>The selection of slot leader mechanism is explained nicely in <a href="https://www.youtube.com/watch?v=M3Xq1qz3ljU" rel="noreferrer">NerdOut</a></p>
