code: function readDefinitionAtMci( conn, definition_chash, max_mci, callbacks )
  {
  	var sql = "SELECT definition FROM definitions CROSS JOIN unit_authors USING(definition_chash) CROSS JOIN units USING(unit) \
  		WHERE definition_chash=? AND is_stable=1 AND sequence='good' AND main_chain_index<=?";
  	var params = [ definition_chash, max_mci ];
  	conn.query
  	(
  		sql,
  		params,
  		function( rows )
  		{
  			if ( rows.length === 0 )
  			{
  				return callbacks.ifDefinitionNotFound( definition_chash );
  			}
  			callbacks.ifFound( JSON.parse( rows[ 0 ].definition ) );
  		}
  	);
  }
docs: max_mci must be stable