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

PBTS: Allow Application to Set BlockTimestamp #2655

Closed
Tracked by #2873
itsdevbear opened this issue Mar 18, 2024 · 6 comments · Fixed by #2966 or #3089 · May be fixed by dydxprotocol/cometbft#29
Closed
Tracked by #2873

PBTS: Allow Application to Set BlockTimestamp #2655

itsdevbear opened this issue Mar 18, 2024 · 6 comments · Fixed by #2966 or #3089 · May be fixed by dydxprotocol/cometbft#29
Labels
enhancement New feature or request
Milestone

Comments

@itsdevbear
Copy link
Contributor

itsdevbear commented Mar 18, 2024

Feature Request

Summary

Useful in cases where the application logic relies on block times adhering to some property.

Problem Definition

Proposal

Create a "PreparePrepareProposal" hook of some kinda.

@itsdevbear itsdevbear added enhancement New feature or request needs-triage This issue/PR has not yet been triaged by the team. labels Mar 18, 2024
@adizere
Copy link
Member

adizere commented Mar 19, 2024

hey Dev, thanks for opening this!

is it fair to say that the underlying concern you'd like to address is ensuring that CometBFT produces blocks at a predictable (ideally fixed) rate, say 1 block every 5 second. so even if blocks are empty, Comet should produce a block every 5 seconds, say.

this model was discussed by the previously team (ref tendermint/tendermint#5911) and it's part of a broader block timeouts UX improvements -- discussion here #2266

@itsdevbear
Copy link
Contributor Author

yeah @adizere you got it!

@cason
Copy link
Collaborator

cason commented Mar 20, 2024

So, the underlying goal here is consensus to wait until the time returned by the application before proposing the block?

@lasarojc
Copy link
Contributor

What if prepareProposal also let the block time to be modified? And prepareProposal could just wait to return when it decides the time is good

@itsdevbear
Copy link
Contributor Author

itsdevbear commented Mar 23, 2024

@lasarojc, that behaviour would actually work for us very well

melekes added a commit that referenced this issue May 2, 2024
@adizere adizere linked a pull request May 2, 2024 that will close this issue
4 tasks
@adizere adizere added this to the 2024-Q2 milestone May 2, 2024
@sergio-mena sergio-mena removed the needs-triage This issue/PR has not yet been triaged by the team. label May 16, 2024
github-merge-queue bot pushed a commit that referenced this issue May 16, 2024
[RENDERED](https://github.com/cometbft/cometbft/blob/2655-predictable-block-times/docs/references/architecture/adr-115-predictable-block-times.md#adr-115-predictable-block-times)

Refs #2655

<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
@sergio-mena sergio-mena reopened this May 17, 2024
@itsdevbear
Copy link
Contributor Author

We should be able to do this in a similar way to how we did the timeout commit.

github-merge-queue bot pushed a commit that referenced this issue May 21, 2024
as `next_block_delay`

ADR-115: #2966
Closes #2655 

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <[email protected]>
teddyding pushed a commit to dydxprotocol/cometbft that referenced this issue Jun 19, 2024
…bft#3089)

as `next_block_delay`

ADR-115: cometbft#2966
Closes cometbft#2655

---

- [ ] ~~Tests written/updated~~
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <[email protected]>
teddyding pushed a commit to dydxprotocol/cometbft that referenced this issue Jun 19, 2024
…bft#3089)

as `next_block_delay`

ADR-115: cometbft#2966
Closes cometbft#2655

---

- [ ] ~~Tests written/updated~~
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment