Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use a dynamic timeout commit modelled on the size of the block #1342

Draft
wants to merge 1 commit into
base: v0.34.x-celestia
Choose a base branch
from

Conversation

cmwaters
Copy link
Contributor

@cmwaters cmwaters commented May 6, 2024

This is meant to show a quick way for implementing a dynamic timeout commit aimed at achieving more consistent block times. The approach is to model how the size of the block effects commit speed. This example PR uses a 8MB block as the upper bound which would reduce the timeout commit propotionally by up to 4 seconds. We obviously need to model what linear formula best fits the celestia network.

blockSizeBytes = maxBlockSize
}

timeoutCommit := cfg.TimeoutCommit - (time.Duration(blockSizeBytes) * perByteDelay)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would be the best of determining this value? I guess adjusting on mocha?

would you describe the upside being simplicity and the downside being that changes to the network require re-calibrating this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this function should be determined empirically by running 100 node networks with varying block sizes from 0MB to 8MB and modelling that into a function.

would you describe the upside being simplicity and the downside being that changes to the network require re-calibrating this value?

Yes it's a good simple temporary solution. If we go down the road of either compact blocks or proposer based timestamps. Those solutions can replace this current one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants