1: \begin{abstract}Let $p>2$ be prime. We state and prove (under mild
2: hypotheses on the residual representation) a geometric refinement of
3: the Breuil--M\'ezard conjecture for 2-dimensional mod $p$
4: representations of the absolute Galois group of $\Qp$. We also state
5: a conjectural generalisation to $n$-dimensional representations of
6: the absolute Galois group of an arbitrary finite extension of $\Qp$,
7: and give a conditional proof of this conjecture, subject to a certain
8: $R = \T$-type theorem together with a strong
9: version of the weight part of Serre's conjecture for rank~$n$
10: unitary groups. We deduce an unconditional result in the case of
11: two-dimensional potentially Barsotti--Tate representations.
12: \end{abstract}
13: