1

I read the technical whitepaper and want to know estimate the total size of block header in a year. Thanks , it's important for me " Tracking all block headers (420 MB/year) will keep proof sizes small" https://github.com/EOSIO/Documentation/blob/master/TechnicalWhitePaper.md

2

I'm not sure on which version of code technical whitepaper is based, but it's a little different from my calculation.

namespace eosio { namespace chain {

struct block_header
{
   block_timestamp_type              timestamp; // 4
   account_name                      producer; // 8
   uint16_t                          confirmed; // 2
   block_id_type                     previous; // 32
   checksum256_type                  transaction_mroot; // 32
   checksum256_type                  action_mroot; // 32
   uint32_t                          schedule_version; // 4
   optional<producer_schedule_type>  new_producers; // 1 
   extensions_type                   header_extensions; // 4
};

} }

Each block header consumes 119 bytes and 63,072,000 blocks are generated every year. (2 blocks/sec * 60 * 60 * 24 * 365) Roughly, 7157.8674 MiB/year is necessary to store all block headers. (It would be larger, because the size of new_producers and header_extension grow when they aren't empty)

| improve this answer | |
  • thanks, i also think 7157.8674 MiB/year is the correct result, and it's important because the storage cost can be large different based the data above. – whr Aug 7 '19 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.