4. Given that the bases of two congruent regular tetrahedra are glued together, exactly forming a hexahedron with all dihedral angles equal, and the shortest edge of this hexahedron is 2, then the distance between the farthest two vertices is $\qquad$ .
4. As shown in the figure, construct $C E \perp A D$, connect $E F$, it is easy to prove $E F \perp A D$, then $\angle C E F$ is the plane angle of the dihedral angle formed by plane $A D F$ and plane $A C D$. Let $G$ be the midpoint of $C D$, similarly, $\angle A G B$ is the plane angle of the dihedral angle formed by plane $A C D$ and plane $B C D$, given that $\angle C E F=\angle A G B$. Let the side length of the base $\triangle C D F$ be $2 a$, and the side length $A D$ be $b$. In $\triangle A C D$, $C E \cdot b=A G \cdot 2 a$,
$$
\therefore \quad C E=\frac{A G \cdot 2 a}{b}=\frac{\sqrt{b^{2}-a^{2}} \cdot 2 a}{b} \text {. }
$$

In $\triangle A B C$, it is easy to find
$$
A B=2 \sqrt{b^{2}-\left(\frac{2}{3} \sqrt{3} a\right)^{2}}=2 \sqrt{b^{2}-\frac{4}{3} a^{2}} .
$$

From $\triangle C E F \backsim \triangle A G B$ we get,
$$
\frac{A B}{C F}=\frac{A G}{C E} .
$$

That is
$$
\frac{2 \sqrt{b^{2}-\frac{4}{3} a^{2}}}{2 a}=\frac{\sqrt{b^{2}-a^{2}}}{\frac{\sqrt{b^{2}-a^{2}} \cdot 2 a}{b}}
$$

Thus, we find $b=\frac{4}{3} a$.
Therefore, $b=2$, and $2 a=3$.
$\therefore$ The distance between the farthest two vertices is 3.