Exact absorbing and periodic boundary conditions allow grating problems¹ infinite physical domains to truncated without introducing any errors. This work presents exact absorbing boundary conditions for 3D diffraction gratings and describes their discretization within a high-order time-domain discontinuous Galerkin finite element method (TD-DG-FEM). The error introduced by the boundary condition discretization matches that of the TD-DG-FEM; this results in an optimal solver in terms of accuracy and computation time. Numerical results demonstrate the superiority of this solver over TD-DG-FEM with perfectly matched layers (PML)-based domain truncation.