code: func (vc *Ring) Rotate() (totalPowerChange *big.Int, totalFlow *big.Int, err error) {
  	// Subtract the tail bucket (if any) from the total
  	err = Subtract(vc.power, vc.Next().Delta)
  	if err != nil {
  		return
  	}
  	// Capture current head as previous before advancing buffer
  	prevHead := vc.Head()
  	// Add head delta to total power
  	err = Add(vc.power, prevHead.Delta)
  	if err != nil {
  		return
  	}
  	// Advance the ring buffer
  	vc.head = vc.index(1)
  	// Overwrite new head bucket (previous tail) with a fresh bucket with Previous_i+1 = Next_i = Previous_i + Delta_i
  	vc.buckets[vc.head] = NewBucket(prevHead.Next)
  	// Capture flow before we wipe it
  	totalFlow = prevHead.Flow.totalPower
  	// Subtract the previous bucket total power so we can add on the current buckets power after this
  	totalPowerChange = new(big.Int).Sub(vc.Head().Previous.TotalPower(), prevHead.Previous.TotalPower())
  	// Record how many of our buckets we have cycled over
  	if vc.populated < vc.size {
  		vc.populated++
  	}
  	return
  }
docs: // Advance the current head bucket to the next bucket and returns the change in total power between the previous bucket
  // and the current head, and the total flow which is the sum of absolute values of all changes each validator's power
  // after rotation the next head is a copy of the current head