>>11903316Well, the dark matter hypothesis is basically that our models of gravity are (mostly) correct, but there is a bunch of invisible stuff messing up our observations. Note that this sort of thing has happened before - look at how Neptune & Neutrinos were discovered. The alternative of course is that gravity behaves differently at very large scales, and we need a better model of gravity. Note too that this has also happened - one early test of relativity is how it predicted Mercury's orbit better than the Newtonian model.
Now the thing is that various indirect observations make a lot more sense under the tons of invisible matter model, like the amount of gravitational lensing being mismatched from the visible matter, or galaxies that look similar having significantly different rotational curves, than what you would predict from a modified gravity model.
As for dark energy, that is another poorly understood kettle of fish. To the best of our ability, the universe appears to be expanding, in an accelerating manner. With everything else we have seen, accelerating things requires energy; to produce the amount of acceleration we see, there would have to be a fuck-ton of energy. And that is about all we know about it. Dark energy could have something to do with gravity, or might not. We just don't know.