Many years ago I needed to measure the bore of an old German rifle. I used a mixture of sulfur and carbon, melted and poured into the bore. I looked it up in Clyde Baker's Modern Gunsmithing.
The method described is to drill a hole in the center of a cork the size of the bore and insert a 1/16" wire in this hole as a handle, as the cast is quite brittle. The cork is inserted in the bore, the mixture is poured into the bore, and the cork is pushed out.
His recipe is 2 ounces of sulfur, 3 grains of powdered lamp black, and 3 drops of gum camphor dissolved in alcohol. This has to be slowly heated and stirred continually. When the mixture arrives at a thin pouring consistency it is poured quickly into the bore. A rod is used to slowly push out the cast, which can then be measured. It shrinks very little, maybe .0005 at the outset, and .001 the next day.