9

Can someone explain the transaction_mroot, action_mroot and block_mroot used in block_header? I understand what a merkel tree is. Is transaction data actually stored in block or just the transaction hash stored in block?

   struct block_header
   {
      digest_type     digest() const;
      uint32_t        block_num() const { return num_from_id(previous) + 1; }
      static uint32_t num_from_id(const block_id_type& id);

      block_id_type                    previous;
      block_timestamp_type             timestamp;

      checksum256_type                 transaction_mroot; /// mroot of cycles_summary
      checksum256_type                 action_mroot;
      checksum256_type                 block_mroot;

      account_name                     producer;

      /** The producer schedule version that should validate this block, this is used to
       * indicate that the prior block which included new_producers->version has been marked
       * irreversible and that it the new producer schedule takes effect this block.
       */
      uint32_t                          schedule_version = 0;
      optional<producer_schedule_type>  new_producers;
   };
8
  • The transaction_mroot is the Merkle root of the transaction_receipts included in the block.

  • The block_mroot is not part of latest master (it is now implicit, factored into signature but not actually on the wire).

  • The action_mroot creates a mroot over all dispatched actions that were evaluated while applying transactions in the block. It is used for IBC proofs and light/partial client validation.

| improve this answer | |

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.