Why each block height only include one transacition record?

Hi Difinity Team & Community Developers, I have some questions here:

  1. why does the block height of ICP ledger only include one transaction record?
  2. does this mechanism take some advantages for some aspects?
1 Like

This decision was taken to avoid internal complexity for the ledger: having more than one transaction per block saves some storage space (the block information like parent hash is shared) but comes with a price of having to deal with additional structure within the block and more complex logic for block creation.
An additional advantage of the one transaction/block is that the block hash can be used to uniquely identify a transaction, but I don’t think this feature is used much.

2 Likes

You are likely aware of this, but just to clarify for anyone else reading: ICP ledger blocks have nothing to do with (NNS) subnet blocks. You can have any number of messages in an NNS block that will result in ICP transactions (and create ledger blocks). So, in particular, there is no limit of one ICP transaction per consensus round/block.

And the ledger canister, as all canisters, processes requests sequentially, one at a time. So batching together multiple transactions in a block would actually be significantly more complex than creating one block per transaction. As is, every ledger canister request that results in a successful transaction produces one more ledger block.

2 Likes