Skip to content

Replace tendermint with cometbft#793

Merged
tzdybal merged 31 commits into
mainfrom
diego/cometbft
Jul 19, 2023
Merged

Replace tendermint with cometbft#793
tzdybal merged 31 commits into
mainfrom
diego/cometbft

Conversation

@Ferret-san

@Ferret-san Ferret-san commented Mar 22, 2023

Copy link
Copy Markdown
Collaborator

use commetbft types in rollkit in order to comply with cosmos-sdk 0.47.0 by replacing tendermint with cometbft, and then replacing cometbft with the rollkit fork of tendermint

@codecov-commenter

codecov-commenter commented Mar 23, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 54.08% and project coverage change: -0.25 ⚠️

Comparison is base (a836166) 55.60% compared to head (48184e3) 55.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #793      +/-   ##
==========================================
- Coverage   55.60%   55.36%   -0.25%     
==========================================
  Files          63       63              
  Lines        6800     6808       +8     
==========================================
- Hits         3781     3769      -12     
- Misses       2607     2633      +26     
+ Partials      412      406       -6     
Impacted Files Coverage Δ
conv/crypto.go 76.92% <ø> (ø)
da/test/da_test_helpers.go 100.00% <ø> (+21.81%) ⬆️
libs/namespace/random_blob.go 0.00% <ø> (ø)
libs/namespace/random_namespace.go 0.00% <ø> (ø)
libs/shares/split_compact_shares.go 66.66% <ø> (ø)
libs/shares/utils.go 73.91% <ø> (ø)
mempool/cache.go 49.12% <ø> (ø)
mempool/clist/clist.go 63.52% <ø> (ø)
mempool/mempool.go 0.00% <ø> (ø)
mempool/v1/mempool_test_helpers.go 87.17% <ø> (ø)
... and 34 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Ferret-san Ferret-san self-assigned this Mar 23, 2023

@tzdybal tzdybal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Few things:

  1. Consider re-importing latest version of mempool from cometbft (as separate, follow-up PR).
  2. tm prefix for imports should be changed - maybe comet would do the trick? cometbytes? cometmath? or cb - cbbytes, cbmath, cbquery`, etc.
  3. Do not use string([]byte("string")). Even in tests.

Comment thread docs/lazy-adr/adr-002-mempool.md
Comment thread go.mod
Comment thread go.mod
Comment thread node/full_client.go Outdated
Comment thread node/full_client_test.go Outdated
Comment thread state/txindex/kv/kv_test.go Outdated
Comment thread state/txindex/kv/kv_test.go Outdated
Comment thread state/txindex/kv/kv_test.go
Comment thread store/store_test.go Outdated
Comment thread types/pb/tendermint/abci/types.pb.go Outdated
@Ferret-san

Copy link
Copy Markdown
Collaborator Author

Few things:

  1. Consider re-importing latest version of mempool from cometbft (as separate, follow-up PR).
  2. tm prefix for imports should be changed - maybe comet would do the trick? cometbytes? cometmath? or cb - cbbytes, cbmath, cbquery`, etc.
  3. Do not use string([]byte("string")). Even in tests.
  1. Could you elaborate on what you mean by re-importing the latest version of mempool as a follow up PR?
  2. On it
  3. On it

@Wondertan

Copy link
Copy Markdown
Contributor

I wonder if this can be a quick "dependency hell" fix as long as the app doesn't migrate to CometBFT.
We should try depending on celestia-node after this PR, to see if it works.
If works, it would make Rollkit being able to migrate to RPC/API much earlier and even use BlobModule right after it's done.

cc @nashqueue

@Ferret-san

Copy link
Copy Markdown
Collaborator Author

CometBFT is needed because of ABCI though

@Wondertan

Copy link
Copy Markdown
Contributor

Yep, my point is that it can also bring additional benefit

@nashqueue

Copy link
Copy Markdown
Contributor

I wonder if this can be a quick "dependency hell" fix as long as the app doesn't migrate to CometBFT.

Core is already on comet bft celestiaorg/celestia-core#980

@Wondertan

Wondertan commented Apr 10, 2023

Copy link
Copy Markdown
Contributor

Core is already on comet bft celestiaorg/celestia-core#980

It just pulls the changes; they didn't rename the module here. Node imports it as tendermint, not comet. And if you migrate to comet, then there will be no conflicts between comet and tendermint in Rollkits dependency graph, which essentially fixes "dependency hell"

@Ferret-san Ferret-san requested a review from tzdybal April 20, 2023 08:08
@Ferret-san

Copy link
Copy Markdown
Collaborator Author

Few things:

  1. Consider re-importing latest version of mempool from cometbft (as separate, follow-up PR).
  2. tm prefix for imports should be changed - maybe comet would do the trick? cometbytes? cometmath? or cb - cbbytes, cbmath, cbquery`, etc.
  3. Do not use string([]byte("string")). Even in tests.
  1. Could you please elaborate further?
  2. Done ✔️
  3. Done ✔️

nashqueue pushed a commit that referenced this pull request May 24, 2023
Since cosmos-sdk release/v0.45.x and release/0.46.x only depend on
cometbft v0.34.x, i have pushed a branch v0.34.x to
https://github.com/rollkit/cometbft/tree/v0.34.x and applied the fraud
proof changes from rollkit/tendermint. This PR is simply replacing the
`github.com/tendermint/tendermint` with `github.com/rollkit/cometbft
v0.0.0-20230523181933-31b0a76c97d9` which corresponds to latest commit
from https://github.com/rollkit/cometbft/tree/v0.34.x.

This builds without any issues, however some tests are failing and needs
to be fixed.

After this, we can release rollkit with this cometbft change and sync
our cosmos-sdk forks (release/v0.45.x and release/v0.46.x) and also add
the newly released rollkit (w/ cometbft).

#793 PR and
https://github.com/rollkit/cometbft/tree/rollkit/v0.37.0 is still needed
when we add support for cosmos-sdk release/v0.47.x, which uses module
`github.com/cometbft/cometbft` path and not
`github.com/tendermint/tendermint`

---------

Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
Comment thread da/test/da_test.go
Comment thread state/executor.go Outdated
Comment thread conv/abci/block.go Outdated
Comment thread state/txindex/kv/kv_test.go Outdated
Comment thread store/store_test.go
tzdybal
tzdybal previously approved these changes Jul 14, 2023
tzdybal
tzdybal previously approved these changes Jul 14, 2023

@tzdybal tzdybal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@nashqueue nashqueue requested a review from gupadhyaya July 16, 2023 14:54
@tzdybal tzdybal added this pull request to the merge queue Jul 19, 2023
Merged via the queue into main with commit c7fdc9e Jul 19, 2023
@tzdybal tzdybal deleted the diego/cometbft branch July 19, 2023 21:52
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.

6 participants