Skip to content

Commit

Permalink
Replaced optimint with dymint and remove irrelevant docs. (dymensionx…
Browse files Browse the repository at this point in the history
  • Loading branch information
omritoptix authored Aug 18, 2022
1 parent 5870a8e commit bdf2396
Show file tree
Hide file tree
Showing 78 changed files with 567 additions and 1,191 deletions.
47 changes: 32 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,49 @@

## Finding an issue

GitHub issues are used to track the work associated with Optimint. That's where you can find things to work on.
GitHub issues are used to track the work associated with Dymint.
That's where you can find things to work on.

Issue labels have been used to help designate the priority, status and beginner-friendliness of various issues. Here are some of the ones that are most relevant to finding a good issue to work on:
Issue labels have been used to help designate the priority,
status and beginner-friendliness of various issues.
Here are some of the ones that are most relevant to finding a
good issue to work on:

- **Issues available for community contribution:**
- `good first issue`: Open to participation from the community and friendly towards new contributors
- `good first issue`: Open to participation from the community and friendly
towards new contributors

No explicit permission is needed to work on these issues but it would be good idea to tag the user who opened the issue and ask that the issue is assinged to yourself.
No explicit permission is needed to work on these issues but it would be good idea
to tag the user who opened the issue and ask that the issue is assinged to yourself.

All issue labels can be [found here](https://github.com/celestiaorg/optimint/labels) for you to explore and see what peaks your interest.
All issue labels can be [found here](https://github.com/dymensionxyz/dymint/labels)
for you to explore and see what peaks your interest.

## Contribution process

Once you've found an issue you'd like to work on, please follow these steps to make your contribution:
Once you've found an issue you'd like to work on, please follow
these steps to make your contribution:

1. Comment on it and say you're working on that issue. This is to avoid conflicts with others also working on the issue.
2. Write your code and submit your pull request.
3. Wait for code review and address any issues raised as soon as you can.
1. Comment on it and say you're working on that issue.
This is to avoid conflicts with others also working on the issue.
1. Write your code and submit your pull request.
1. Wait for code review and address any issues raised as soon as you can.

**A note on collaboration:** We encourage people to collaborate as much as possible. We especially appreciate contributors reviewing each others pull requests, as long as you are kind and constructive when you do so.
**A note on collaboration:** We encourage people to collaborate as much as possible.
We especially appreciate contributors reviewing each others pull requests,
as long as you are kind and constructive when you do so.

## Proposing a new issue

If you want to work on something that there is no GitHub issue for, follow these steps:
If you want to work on something that there is no GitHub issue for,
follow these steps:

1. Create a a new GitHub issue and propose your change there. Be sure to include implementation details and the rationale for the proposed change.
- We are very reluctant to accept random pull requests without a related issue created first.
2. Wait for a project maintainer to evaluate your issue and decide whether it's something that we will accept a pull request for.
3. Once the project maintainer has approved the issue, you may start work on code as described in the "Contribution process" section above.
1. Create a a new GitHub issue and propose your change there.
Be sure to include implementation details and the rationale for the proposed change.
We are very reluctant to accept random pull requests without
a related issue created first.

1. Wait for a project maintainer to evaluate your issue and decide
whether it's something that we will accept a pull request for.
1. Once the project maintainer has approved the issue, you may
start work on code as described in the "Contribution process" section above.
33 changes: 5 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# optimint
# dymint

ABCI-client implementation for Optimistic Rollups.

Design document: <https://docs.google.com/document/d/12gZow_JTJjRrmaD2mNTmYniLhyxVLSyDd7Fbxo5UnA8/edit?usp=sharing>

[![build-and-test](https://github.com/celestiaorg/optimint/actions/workflows/test.yml/badge.svg)](https://github.com/celestiaorg/optimint/actions/workflows/test.yml)
[![golangci-lint](https://github.com/celestiaorg/optimint/actions/workflows/lint.yml/badge.svg)](https://github.com/celestiaorg/optimint/actions/workflows/lint.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/celestiaorg/optimint)](https://goreportcard.com/report/github.com/celestiaorg/optimint)
[![codecov](https://codecov.io/gh/celestiaorg/optimint/branch/main/graph/badge.svg?token=CWGA4RLDS9)](https://codecov.io/gh/celestiaorg/optimint)
[![GoDoc](https://godoc.org/github.com/celestiaorg/optimint?status.svg)](https://godoc.org/github.com/celestiaorg/optimint)
[![Twitter Follow](https://img.shields.io/twitter/follow/CelestiaOrg?style=social)](https://twitter.com/CelestiaOrg)
ABCI-client implementation for Optimistic Rollups
on top of dymension settlement hub.

## Building From Source

Expand All @@ -18,8 +10,8 @@ Requires Go version >= 1.17.
To build:

```sh
git clone https://github.com/celestiaorg/optimint.git
cd optimint
git clone https://github.com/dymensionxyz/dymint.git
cd dymint
go build -v ./...
```

Expand All @@ -34,18 +26,3 @@ To regenerate protobuf types:
```sh
./proto/gen.sh
```

## Contributing

We welcome your contributions! Everyone is welcome to contribute, whether it's in the form of code,
documentation, bug reports, feature requests, or anything else.

If you're looking for issues to work on, try looking at the [good first issue list](https://github.com/celestiaorg/optimint/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). Issues with this tag are suitable for a new external contributor and is a great way to find something you can help with!

See [the contributing guide](./CONTRIBUTING.md) for more details.

Please join our [Community Discord](https://discord.com/invite/YsnTPcSfWQ) to ask questions, discuss your ideas, and connect with other contributors.

## Code of Conduct

See our Code of Conduct [here](https://docs.celestia.org/community/coc).
16 changes: 8 additions & 8 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
"github.com/tendermint/tendermint/proxy"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/celestiaorg/optimint/config"
"github.com/celestiaorg/optimint/da"
"github.com/celestiaorg/optimint/log"
"github.com/celestiaorg/optimint/mempool"
"github.com/celestiaorg/optimint/settlement"
"github.com/celestiaorg/optimint/state"
"github.com/celestiaorg/optimint/store"
"github.com/celestiaorg/optimint/types"
"github.com/dymensionxyz/dymint/config"
"github.com/dymensionxyz/dymint/da"
"github.com/dymensionxyz/dymint/log"
"github.com/dymensionxyz/dymint/mempool"
"github.com/dymensionxyz/dymint/settlement"
"github.com/dymensionxyz/dymint/state"
"github.com/dymensionxyz/dymint/store"
"github.com/dymensionxyz/dymint/types"
)

// defaultDABlockTime is used only if DABlockTime is not configured for manager
Expand Down
18 changes: 9 additions & 9 deletions block/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"testing"
"time"

mempoolv1 "github.com/celestiaorg/optimint/mempool/v1"
"github.com/celestiaorg/optimint/settlement"
"github.com/celestiaorg/optimint/testutil"
mempoolv1 "github.com/dymensionxyz/dymint/mempool/v1"
"github.com/dymensionxyz/dymint/settlement"
"github.com/dymensionxyz/dymint/testutil"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -19,12 +19,12 @@ import (
"github.com/tendermint/tendermint/libs/pubsub"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/celestiaorg/optimint/config"
"github.com/celestiaorg/optimint/da"
mockda "github.com/celestiaorg/optimint/da/mock"
slmock "github.com/celestiaorg/optimint/settlement/mock"
slregistry "github.com/celestiaorg/optimint/settlement/registry"
"github.com/celestiaorg/optimint/store"
"github.com/dymensionxyz/dymint/config"
"github.com/dymensionxyz/dymint/da"
mockda "github.com/dymensionxyz/dymint/da/mock"
slmock "github.com/dymensionxyz/dymint/settlement/mock"
slregistry "github.com/dymensionxyz/dymint/settlement/registry"
"github.com/dymensionxyz/dymint/store"
)

const defaultBatchSize = 5
Expand Down
28 changes: 14 additions & 14 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ import (
)

const (
flagAggregator = "optimint.aggregator"
flagDALayer = "optimint.da_layer"
flagDAConfig = "optimint.da_config"
flagSettlementLayer = "optimint.settlement_layer"
flagSettlementConfig = "optimint.settlement_config"
flagBlockTime = "optimint.block_time"
flagDABlockTime = "optimint.da_block_time"
flagBatchSyncInterval = "optimint.batch_sync_interval"
flagDAStartHeight = "optimint.da_start_height"
flagNamespaceID = "optimint.namespace_id"
flagBlockBatchSize = "optimint.block_batch_size"
flagAggregator = "dymint.aggregator"
flagDALayer = "dymint.da_layer"
flagDAConfig = "dymint.da_config"
flagSettlementLayer = "dymint.settlement_layer"
flagSettlementConfig = "dymint.settlement_config"
flagBlockTime = "dymint.block_time"
flagDABlockTime = "dymint.da_block_time"
flagBatchSyncInterval = "dymint.batch_sync_interval"
flagDAStartHeight = "dymint.da_start_height"
flagNamespaceID = "dymint.namespace_id"
flagBlockBatchSize = "dymint.block_batch_size"
)

// NodeConfig stores Optimint node configuration.
// NodeConfig stores Dymint node configuration.
type NodeConfig struct {
// parameters below are translated from existing config
RootDir string
DBPath string
P2P P2PConfig
RPC RPCConfig
// parameters below are optimint specific and read from config
// parameters below are dymint specific and read from config
Aggregator bool `mapstructure:"aggregator"`
BlockManagerConfig `mapstructure:",squash"`
DALayer string `mapstructure:"da_layer"`
Expand Down Expand Up @@ -77,7 +77,7 @@ func (nc *NodeConfig) GetViperConfig(v *viper.Viper) error {
return nil
}

// AddFlags adds Optimint specific configuration options to cobra Command.
// AddFlags adds Dymint specific configuration options to cobra Command.
//
// This function is called in cosmos-sdk.
func AddFlags(cmd *cobra.Command) {
Expand Down
18 changes: 9 additions & 9 deletions conv/abci/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/celestiaorg/optimint/types"
"github.com/dymensionxyz/dymint/types"
)

// ToABCIHeaderPB converts Optimint header to Header format defined in ABCI.
// Caller should fill all the fields that are not available in Optimint header (like ChainID).
// ToABCIHeaderPB converts Dymint header to Header format defined in ABCI.
// Caller should fill all the fields that are not available in Dymint header (like ChainID).
func ToABCIHeaderPB(header *types.Header) (tmproto.Header, error) {
return tmproto.Header{
Version: tmversion.Consensus{
Expand Down Expand Up @@ -39,8 +39,8 @@ func ToABCIHeaderPB(header *types.Header) (tmproto.Header, error) {
}, nil
}

// ToABCIHeader converts Optimint header to Header format defined in ABCI.
// Caller should fill all the fields that are not available in Optimint header (like ChainID).
// ToABCIHeader converts Dymint header to Header format defined in ABCI.
// Caller should fill all the fields that are not available in Dymint header (like ChainID).
func ToABCIHeader(header *types.Header) (tmtypes.Header, error) {
return tmtypes.Header{
Version: tmversion.Consensus{
Expand Down Expand Up @@ -68,7 +68,7 @@ func ToABCIHeader(header *types.Header) (tmtypes.Header, error) {
}, nil
}

// ToABCIBlock converts Optimint block into block format defined by ABCI.
// ToABCIBlock converts Dymint block into block format defined by ABCI.
// Returned block should pass `ValidateBasic`.
func ToABCIBlock(block *types.Block) (*tmtypes.Block, error) {
abciHeader, err := ToABCIHeader(&block.Header)
Expand Down Expand Up @@ -96,7 +96,7 @@ func ToABCIBlock(block *types.Block) (*tmtypes.Block, error) {
return &abciBlock, nil
}

// ToABCIBlockMeta converts Optimint block into BlockMeta format defined by ABCI
// ToABCIBlockMeta converts Dymint block into BlockMeta format defined by ABCI
func ToABCIBlockMeta(block *types.Block) (*tmtypes.BlockMeta, error) {
tmblock, err := ToABCIBlock(block)
if err != nil {
Expand All @@ -112,8 +112,8 @@ func ToABCIBlockMeta(block *types.Block) (*tmtypes.BlockMeta, error) {
}, nil
}

// ToABCICommit converts Optimint commit into commit format defined by ABCI.
// This function only converts fields that are available in Optimint commit.
// ToABCICommit converts Dymint commit into commit format defined by ABCI.
// This function only converts fields that are available in Dymint commit.
// Other fields (especially ValidatorAddress and Timestamp of Signature) has to be filled by caller.
func ToABCICommit(commit *types.Commit) *tmtypes.Commit {
tmCommit := tmtypes.Commit{
Expand Down
2 changes: 1 addition & 1 deletion conv/addr.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/multiformats/go-multiaddr"

"github.com/celestiaorg/optimint/config"
"github.com/dymensionxyz/dymint/config"
)

// TranslateAddresses updates conf by changing Cosmos-style addresses to Multiaddr format.
Expand Down
2 changes: 1 addition & 1 deletion conv/addr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/assert"

"github.com/celestiaorg/optimint/config"
"github.com/dymensionxyz/dymint/config"
)

func TestTranslateAddresses(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions conv/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package conv
import (
tmcfg "github.com/tendermint/tendermint/config"

"github.com/celestiaorg/optimint/config"
"github.com/dymensionxyz/dymint/config"
)

// GetNodeConfig translates Tendermint's configuration into Optimint configuration.
// GetNodeConfig translates Tendermint's configuration into Dymint configuration.
//
// This method only translates configuration, and doesn't verify it. If some option is missing in Tendermint's
// config, it's skipped during translation.
Expand Down
2 changes: 1 addition & 1 deletion conv/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/celestiaorg/optimint/config"
"github.com/dymensionxyz/dymint/config"
tmcfg "github.com/tendermint/tendermint/config"
)

Expand Down
10 changes: 5 additions & 5 deletions da/celestia/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/gogo/protobuf/proto"

"github.com/celestiaorg/go-cnc"
"github.com/celestiaorg/optimint/da"
"github.com/celestiaorg/optimint/log"
"github.com/celestiaorg/optimint/store"
"github.com/celestiaorg/optimint/types"
pb "github.com/celestiaorg/optimint/types/pb/optimint"
"github.com/dymensionxyz/dymint/da"
"github.com/dymensionxyz/dymint/log"
"github.com/dymensionxyz/dymint/store"
"github.com/dymensionxyz/dymint/types"
pb "github.com/dymensionxyz/dymint/types/pb/dymint"
)

// DataAvailabilityLayerClient use celestia-node public API.
Expand Down
10 changes: 5 additions & 5 deletions da/celestia/mock/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
mux2 "github.com/gorilla/mux"

"github.com/celestiaorg/go-cnc"
"github.com/celestiaorg/optimint/da"
mockda "github.com/celestiaorg/optimint/da/mock"
"github.com/celestiaorg/optimint/log"
"github.com/celestiaorg/optimint/store"
"github.com/celestiaorg/optimint/types"
"github.com/dymensionxyz/dymint/da"
mockda "github.com/dymensionxyz/dymint/da/mock"
"github.com/dymensionxyz/dymint/log"
"github.com/dymensionxyz/dymint/store"
"github.com/dymensionxyz/dymint/types"
)

// Server mocks celestia-node HTTP API.
Expand Down
10 changes: 5 additions & 5 deletions da/da.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package da

import (
"github.com/celestiaorg/optimint/log"
"github.com/celestiaorg/optimint/store"
"github.com/celestiaorg/optimint/types"
"github.com/dymensionxyz/dymint/log"
"github.com/dymensionxyz/dymint/store"
"github.com/dymensionxyz/dymint/types"
)

// StatusCode is a type for DA layer return status.
// TODO: define an enum of different non-happy-path cases
// that might need to be handled by Optimint independent of
// that might need to be handled by Dymint independent of
// the underlying DA chain.
type StatusCode uint64

Expand Down Expand Up @@ -42,7 +42,7 @@ type BaseResult struct {
type ResultSubmitBatch struct {
BaseResult
// Not sure if this needs to be bubbled up to other
// parts of Optimint.
// parts of Dymint.
// Hash hash.Hash
}

Expand Down
Loading

0 comments on commit bdf2396

Please sign in to comment.