Test fire guns using enough rounds to "fingerprint" the bullets and put the images into a database.
This solution does not intrude on any rights whatsoever. (Although I am in favor of background checks, as are 90% of my fellow citizens, a background check requires a human to check, obviously, and may therefore intrude - I'll leave that to lawyers.) Bullet databases do not intrude. If you are a good person and your gun is stolen, you would report it as such immediately. As it is now, "my cousin stole it". Who's your cousin? Why, his name is Bob and he leaves on the second floor. He's also a felon who killed before, and for some reason, he gave me $300, but, yeah, nevermind all that, he stole it I tell ya!