Nor may the legislation violate any of the rights protected by the Bill of Rights. The nature of an amendment, which the BoR are, is that it overrides the basic document when there is a conflict.
This principle might not apply to the CA pot laws, but it certainly does apply to firearms laws, because each one of them violated the Second Amendment.
Other than Miller, do you have any other cases that challenge the federal firearm laws as a violation of the Second Amendment? I know of none.