You are thinking of Lucifer’s Hammer by Larry Niven and JP.
https://en.wikipedia.org/wiki/Lucifer%27s_Hammer
This link has reviews from various reviewers: http://www.goodreads.com/book/show/218467.Lucifer_s_Hammer
Read the book I recommended.
There is a war between a lunar colony and earth.
The colonists throw rocks.
The physical detail in Lucifer’s Hammer was based on underlying science.