Search code examples
hyperledger-fabricethereumfilesize

What is the average size of the transaction in Ethereum and Hyperledger Fabric?


I have learned that the average size of a transaction in Bitcoin is about 250B. Considering Ethereum and Hyperledger Fabric support smart contract, thus the average size of a transaction/message proposed by a client may be larger. So, what is the average size of the transaction in Ethereum and Hyperledger Fabric? Or how can I get the data?


Solution

  • The average size of a Fabric transaction will depend on the application. However, typically, the bulk of the Fabric transaction size is used for expressing identities (encoded as X.509 certificates).

    Depending on the properties of the X.509 certificates, they can vary in size, but several hundred bytes is typical, sometimes up to a few kilobytes.

    In a Fabric transaction, there is generally the submitter, and a set of endorsers, minimally recommended to be 2. So, for a smart contract (chaincode) requiring 2 endorsements, the identities will likely take up a few kb (assume 3 identities * 800 bytes/identity = 2400 bytes).

    Beyond the identities, there is the read/write set, the signatures, some timestamps, nonce, etc. But these generally add up to only a few hundred bytes, so the size of the transaction is domainated by the identities.

    For a concise "average transaction size", you could say 3kb or so, though it will vary depending on identity structures, and application.

    I would note, that the application for Bitcoin (and to a large extent Ethereum) is quite different than for Fabric. Generally speaking, Fabric networks are permissioned, which means they have far fewer participants, and fewer copies of the data are kept, so transaction size is not as critical.