Here's how the C++ code calculates the block digest: * `digest_type::hash(*this)` serializes the block into a binary form, then runs the binary through sha-256. * [block.hpp#L125](https://github.com/EOSIO/eos/blob/2ae615179822a3d3a9ef49b5f4b03d2de3cd6daf/libraries/chain/include/eosio/chain/block.hpp#L125) identifies the order that the fields are serialized in. * The types of these fields is at [block.hpp#L18](https://github.com/EOSIO/eos/blob/2ae615179822a3d3a9ef49b5f4b03d2de3cd6daf/libraries/chain/include/eosio/chain/block.hpp#L12) * Each type has its own serialization procedure. Most of them live in libraries/fc. Note: many users of the JSON RPC API have to serialize objects to binary form, so I suspect someone will create documentation of this process. Note: the block fields may still change. I pointed to the master branch as of 2018-05-08.