  Distant galaxies show correlations between their current star-formation rates
(SFRs) and stellar masses, implying that their star-formation histories (SFHs)
are highly similar. Moreover, observations show that the UV luminosities and
stellar masses grow from z=8 to 3, implying that the SFRs increase with time.
We compare the cosmologically averaged evolution in galaxies at 3 < z < 8 at
constant comoving number density, n = 2 x 10^-4 Mpc^-3. This allows us to study
the evolution of stellar mass and star formation in the galaxy predecessors and
descendants in ways not possible using galaxies selected at constant stellar
mass or SFR, quantities that evolve strongly in time. We show that the average
SFH of these galaxies increase smoothly from z=8 to 3 as SFR ~ t^alpha with
alpha = 1.7 +/- 0.2. This conflicts with assumptions that the SFR is either
constant or declines exponentially in time. We show that the stellar mass
growth in these galaxies is consistent with this derived SFH. This provides
evidence that the slope of the high-mass end of the IMF is approximately
Salpeter unless the duty cycle of star formation is much less than unity. We
argue that these relations follow from gas accretion (either through accretion
or delivered by mergers) coupled with galaxy disk growth under the assumption
that the SFR depends on the local gas surface density. This predicts that gas
fractions decrease from z=8 to 3 on average as f_gas ~ (1+z)^0.9 for galaxies
with this number density. The implied galaxy gas accretion rates at z > 4 are
as fast and may even exceed the SFR: this is the "gas accretion epoch". At z <
4 the SFR overtakes the implied gas accretion rate, indicating a period where
galaxies consume gas faster than it is acquired. At z < 3, galaxies with this
number density depart from these relations implying that star formation and gas
accretion are slowed at later times.
