rollmint icon indicating copy to clipboard operation
rollmint copied to clipboard

[EPIC] Remove cometbft dependencies

Open gupadhyaya opened this issue 1 year ago • 0 comments

github.com/cometbft/cometbft/types: 
    - GenesisDoc
    - EventBus
    - ValidatorSet & methods
    - Tx, Txs, TxKey: replace w/ plain bytes

github.com/cometbft/cometbft/abci/types

github.com/cometbft/cometbft/proto/tendermint/state: remove
    - ABCIResponses
    - Version

github.com/cometbft/cometbft/proto/tendermint/types: dependency because of ABCI, after ABCI abstracttion we can use our own header
    - header

github.com/cometbft/cometbft/proto/tendermint/version: can remove, but we may need some form of versioning

github.com/cometbft/cometbft/crypto: remove
    - AddressHash

github.com/cometbft/cometbft/crypto/merkle: copy the functionality
    - TxProof (not used)
    - HashFromByteSlices
    - ProofsFromByteSlices

github.com/cometbft/cometbft/crypto/ed25519: copy

github.com/cometbft/cometbft/crypto/tmhash: copy as its just sha256

github.com/cometbft/cometbft/proxy: wait for ABCI refactoring by cosmos-sdk team which should allow app to invoke consensus engine over rpc instead of dependency

github.com/cometbft/cometbft/crypto/encoding: 

github.com/cometbft/cometbft/version: remove and use our own versioning


github.com/cometbft/cometbft/config: remove reliance on cometbft config, use just rollkit config
    - node config
    - mempool config
    - rpc config
Notes: [Congfix](https://github.com/cosmos/cosmos-sdk/blob/main/tools/confix/diff.go), library that allows reading dynamically the config instead of recreating it. we could just recreate it with what we need, because importing the yaml/toml file is unnecessary

github.com/cometbft/cometbft/p2p: use libp2p key directly, no need for conversion
    - node key
    - id

github.com/cometbft/cometbft/libs/bytes: remove HexBytes and use []byte instead
    - HexBytes

github.com/cometbft/cometbft/libs/service: remove as full/light nodes need not be BaseService
    - BaseService

github.com/cometbft/cometbft/libs/log: use go 1.21 with that own logger

github.com/cometbft/cometbft/libs/rand: remove

github.com/cometbft/cometbft/libs/sync: use sync library

github.com/cometbft/cometbft/libs/clist: use clist from our mempool package which already copies it from cometbft

github.com/cometbft/cometbft/libs/math: remove

github.com/cometbft/cometbft/libs/pubsub: keep it
### Tasks
- [ ] Tx, Txs, TxKey: replace w/ plain bytes
- [ ] Remove ABCIResponses and Version from proto/tendermint/state
- [ ] Remove proto/tendermint/version dependency and use own versioning
- [ ] Remove crypto.AddressHash dependency
- [ ] Copy code and remove dependency on crypto.merkle
- [ ] Remove crypto.ed25519 dependency by copying or using ed25519 pkg
- [ ] Copy to remove dependency on crypto.tmhash
- [ ] Remove dependency on cometbft/version and use own versioning
- [ ] Remove cometbft/config dependency and use rollkit config
- [ ] Remove cometbft/p2p dependency and use libp2p directly
- [ ] Remove libs/bytes dependency
- [ ] Remove libs/service dependency as full/light nodes need not use BaseService
- [ ] Remove libs/log dependency and use go 1.21 logger
- [ ] Remove libs/rand dependency
- [ ] https://github.com/rollkit/rollkit/issues/1170
- [ ] Use clist from mempool package directly which is already a copies from cometbft
- [ ] https://github.com/rollkit/rollkit/issues/1171
- [ ] https://github.com/rollkit/rollkit/issues/1045
- [ ] https://github.com/rollkit/rollkit/issues/101

gupadhyaya avatar Aug 04 '23 15:08 gupadhyaya