All witnesses summoned for the Commonwealth shall be entitled to receive for each day's attendance all necessary tolls, and such reimbursement for his daily mileage as prescribed in § 2.2-2823. All allowances to witnesses summoned on behalf of the Commonwealth shall be paid by the treasurer of the county or corporation in which the trial is held or in which the grand jury is summoned and the amount so paid by such treasurer shall be refunded to him out of the state treasury, on a certificate of the clerk of the court in which the trial was held or before which the grand jury was summoned.
Va. Code § 17.1-611