celestiaorg / celestia-app

PoS application for the consensus portion of the Celestia network. Built using celestia-core (fork of CometBFT) and the cosmos-sdk
https://celestia.org
Apache License 2.0
328 stars 261 forks source link

Support customisable upper bounds to block size with build tags #3603

Open cmwaters opened 1 week ago

cmwaters commented 1 week ago

Summary

Celestia currently has hardcoded limits to the block size (in bytes) and square size (in shares). These guardrails are in place to prevent on chain governance from picking a limit that exceeds the capacity of the network. However, in performance based testing we want to continually explore and improve that limit. In the past we have used feature branches where we have modified that limit to run our tests but these cause other complications.

Proposal

Look into using build tags which would allow us to define those limits at compile time.

celestia-core already uses build tags for injecting the commit hash. See https://github.com/celestiaorg/celestia-core/blob/ff2bff4a29aec6851499e34b7d84349d8e774dd9/Makefile#L8

Using the same technique we could also inject values for the limits. The defaults can remain untouched but in certain cases of testing we can set these bounds when building the binary or the docker image