Closed rootulp closed 1 month ago
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
These values are just in prepare proposal. They are not part of consensus and thus don't need to be versioned. We can change them at will from minor release to minor release
These values are just in prepare proposal. They are not part of consensus and thus don't need to be versioned. We can change them at will from minor release to minor release
is a good point. I think we should close this PR and https://github.com/celestiaorg/celestia-app/issues/3973 as won't do.
These values are just in prepare proposal. They are not part of consensus and thus don't need to be versioned. We can change them at will from minor release to minor release
this is what I thought as well, but I think someone pointed out that this would just save us the scenario where we can't increase them until some consensus breaking change. In that case, we don't have to have the consensus breaking change first, then cut a release that has the increased values.
therefore I'm good with this now
we can also version them later if that is the case, so I'm also good with keeping this closed until then
but I think someone pointed out that this would just save us the scenario where we can't increase them until some consensus breaking change.
Why can't we change them until some consensus breaking change? It's confusing because the constants are located in a file named global_consts.go
but they don't actually need to remain constant for the lifetime of the network like the other constants in that file:
They can change whenever. In retrospect, it might have been clearer to define these constants where they're used in validate_txs.go
.
We could argue that versioning can be beneficial in scenarios like one version is running 2mb blocks, with these limitations softly enforced by validators not changing the code, and the next version has some outstanding optimisations that won't be activated until a breaking upgrade is done that allows for higher limitations and 8mb blocks for example. In this case we would want to enforce a soft control on the blocks being produced until the upgrade height, and versioning would be beneficial.
But I guess that it's fine to leave it for future us to worry about it and implement it if needed. We can always version anything in the code 😄
In retrospect, it might have been clearer to define these constants where they're used in validate_txs.go
I think the confusion arises from these constants being recommended but not mandatory, being only softly enforced. The reason why I think they belong in app consts is to avoid having limitations scattered around the repo that devs will need to source dive to find them (similar to what sometimes happens in LibP2P where some consts are set in weird places, and you have no idea why the code is behaving in a certain way until you deep dive). Having the consts in the same place helps with this.
We might think of adding a new file that contains non consensus breaking consts and put them all in there, to make the distinction between consensus breaking vs non-breaking. But I guess we don't need to worry much about this as this code will change in the near future with blocks increasing in size, and we might not even need to enforce such limitations.
TL;DR: I see no harm in merging this PR or leaving it for our future selves to worry about 😄
We might think of adding a new file that contains non consensus breaking consts and put them all in there, to make the distinction between consensus breaking vs non-breaking.
I agree, this could help
Closes https://github.com/celestiaorg/celestia-app/issues/3973