This removes some boilerplate code, and we can emulate immutability with frozen=True.
Also, define the default values in the class body for the constants that are identical for all 3 contexts. And use the cosntants defined in p2p.py when available for these defaut values.