Limits and Performance

Brevis is built as a highly performant and highly scalable ZK Coprocessor. As Brevis is currently running in Alpha mainnet with a low-capacity prover infrastructure, there are some limits in the public version worth mentioning here. However, note that our developer partners have implemented use cases handling more than 100X more scale than the public version. Therefore, we suggest developers to use the public version as a testbed for now and talk to us about your production launch.

We also provide a brief overview of some performance benchmarks.

Data Access Limits in Public Alpha

The limits below are set up in a data-driven way according to Ethereum historical trace, which should cover >95% use cases.

If your project requests higher limits, please reach out to us. Brevis can support much higher data limits on a partner-request basis.

Total Data Points

The maximum number of total receipts/storages/transactions you can process in one query in the publicly accessible version is limited to 1500.

There is no limit for each individual type of data point. You could allocate all 1500 to receipts, or you could allocate 2 for receipts, 1 for storage, and 100 for transactions. You don't need to always fully allocate the 1500 data slots.

Transaction

There is a maximum of 512 transactions in one query.

The transaction calldata size must not be more than 2048 bytes.

Only transactions of type 0 (legacy) and type 2 (dynamic fee) are supported.

Receipt

There is a maximum of 1500 receipts in one query.

The maximum number of log fields you can instruct Brevis to decode in each receipt is 4.

The maximum length of the RLP-encoded receipt is 2040 bytes.

The maximum number of logs in a receipt is 12.

The maximum data length of a log is 256 bytes.

The maximum length of log field values is 32 bytes.

Storage

There is a maximum of 1500 storage slots in one query.

The maximum length of the storage value is 32 bytes.

The maximum storage depth level in MPT is 8.

Application Circuit Size Limit

Circuit size is described by a metric called "constraints". The constraints number is printed to console whenever you compile your circuit. Your circuits will have a constraints upper limit of 2^26.

Application Circuit Output Limit

There is no artificially imposed upper limit for the amount of circuit outputs you can have, but the more outputs you have, the bigger your circuit will be. The amount of outputs will be bound by the circuit size limit described above.

Performance Benchmarks

Brevis will give you the lowest operation overhead, cost and the best user experience for your dApps. Brevis is highly horizontally scalable and can easily support much higher scalability than the current publicly available version. Please contact us if you have large-scale use cases.

The current public deployment is supported by a tiny cluster of virtualized servers with low-cost commodity hardware. In this deployment, Brevis achieves 5-10X faster proving performance than other solutions with comparable configuration of limits. See below benchmarks to get an idea.

Data TypeNumber of Data PointsEnd-to-end Coprocessing Time*

Transaction Receipt

1

32s

Transaction Receipt

128

45s

Transaction Receipt

1024

143s

Storage Slot

1

33s

Storage Slot

128

46s

Storage Slot

1024

146s

Transaction

1

41s

Transaction

128

56s

Transaction

1024

203s

*End-to-end time here account for the time from the query to the App Service to the completion of aggregated application and data access proof generation.

Last updated