  We present a detailed investigation of a sub-dominant oscillating scalar
field ('early dark energy', EDE) in the context of resolving the Hubble
tension. Consistent with earlier work, but without relying on fluid
approximations, we find that a scalar field frozen due to Hubble friction until
${\rm log}_{10}(z_c)\sim3.5$, reaching $\rho_{\rm EDE}(z_c)/\rho_{\rm
tot}\sim10$%, and diluting faster than matter afterwards can bring cosmic
microwave background (CMB), baryonic acoustic oscillations, supernovae
luminosity distances, and the late-time estimate of the Hubble constant from
the SH0ES collaboration into agreement. A scalar field potential which scales
as $V(\phi) \propto \phi^{2n}$ with $2\lesssim n\lesssim 3.4$ around the
minimum is preferred at the 68% confidence level, and the {\em Planck}
polarization places additional constraints on the dynamics of perturbations in
the scalar field. In particular, the data prefers a potential which flattens at
large field displacements. An MCMC analysis of mock data shows that the
next-generation CMB observations (i.e., CMB-S4) can unambiguously detect the
presence of the EDE at very high significance. This projected sensitivity to
the EDE dynamics is mainly driven by improved measurements of the $E$-mode
polarization.
  We also explore new observational signatures of EDE scalar field dynamics:
(i) We find that depending on the strength of the tensor-to-scalar ratio, the
presence of the EDE might imply the existence of isocurvature perturbations in
the CMB. (ii) We show that a strikingly rapid, scale-dependent growth of EDE
field perturbations can result from parametric resonance driven by the
anharmonic oscillating field for $n\approx 2$. This instability and ensuing
potentially nonlinear, spatially inhomogenoues, dynamics may provide unique
signatures of this scenario.
