Skip to main content
Version: Current

Collections

Collections link blocks and transactions together. Collection node clusters make these collections (using the HotStuff consensus algorithm), made up of an ordered list of one or more hashes of signed transactions. In order to optimize data, blocks don’t contain transactions (as they do on Ethereum). The benefits are transaction data does not get transferred to consensus nodes on the network which optimizes transfer speed and this architecture allows scaling of ingestion speed by adding collection clusters. Consensus nodes need to only agree on the order of transactions to be executed, they don’t need to know the transaction payload, thus making blocks and collections lightweight. Collection nodes hold transaction payloads for anyone who requests them (e.g. execution nodes).

Screenshot 2023-08-17 at 19.50.39.png

Collection Retrieval

You can use the Flow CLI to get the collection data by running:


_10
flow collections get caff1a7f4a85534e69badcda59b73428a6824ef8103f09cb9eaeaa216c7d7d3f -n mainnet

Find more about the command in the CLI docs.

Collections can be obtained from the access node APIs, currently, there are two gRPC and REST APIs. You can find more information about them here:

gRPC Collection API

REST Collection API

There are multiple SDKs implementing the above APIs for different languages:

Javascript SDK

Go SDK

Find a list of all SDKs here