Canonical Serialization - libbitcoin/libbitcoin-server GitHub Wiki
Libbitcoin serializes message objects in accordance with the peer's protocol level. However it is often useful to use a context free serialization. This is referred to as the canonical serialization.
This serialization can be obtained by passing bc::message::version::level::canonical to message serialization methods in place of an actual protocol version level.
Transactions, blocks and most other objects are serialized in accordance with the wire protocol. Block headers are serialized in accordance with the wire protocol but excluding the transaction count value. This produces a fixed 80 byte encoding.