Analysis of millions of galaxies upholds Albert Einstein’s ideas about gravity and also offers tantalising new hints of how dark energy may have evolved