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!: replace a some same proto message to Tendermint #546

Merged
merged 27 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
45bef51
chore: remove otracon/libs/bits
zemyblue Jan 6, 2023
413b59e
feat: clean up `proto/ostracon/p2p/` directory protos
zemyblue Jan 6, 2023
7235ef1
feat: clean up `proto/ostracon/store/` directory proto
zemyblue Jan 6, 2023
89527e3
feat: clean up `crypto`, `mempool` and `statesync` directory proto
zemyblue Jan 6, 2023
9e23a22
feat: clean up `proto/ostracon/crypto` directory proto
zemyblue Jan 6, 2023
0b02c87
feat: clean up `proto/ostracon/version` directory proto
zemyblue Jan 6, 2023
051dc7f
feat: clean up `proto/ostracon/types` proto directory
zemyblue Jan 6, 2023
db4a266
feat: clean up `proto/ostracon/state` proto directory
zemyblue Jan 6, 2023
86c84be
feat: clean up `proto/ostracon/blockchain` proto directory
zemyblue Jan 6, 2023
fbe0cfe
feat: clean up `proto/ostracon/privval` proto directory
zemyblue Jan 6, 2023
29ca21d
feat: clean up `proto/ostracon/abci` proto directory
zemyblue Jan 6, 2023
3f3c9b7
chore: change import alias
zemyblue Jan 10, 2023
02f81a9
feat: clean up the `PublicKey` of `ostracon/crypto/keys` message and …
zemyblue Jan 23, 2023
3668c26
feat!: replace `types.validator.proto` to Tendermint proto
zemyblue Jan 25, 2023
0bc4c6f
feat!: replace `abci/types.proto` and `state/types.proto` to Tendermi…
zemyblue Jan 25, 2023
faf3811
feat!: replace `privval/types.proto` and `types/types.proto` to Tende…
zemyblue Jan 25, 2023
27e06e6
feat!: replace `abci/types.proto` to Tendermint proto.
zemyblue Jan 25, 2023
0477a75
chore: remove commented out proto message
zemyblue Jan 25, 2023
93d0293
chore: fix proto lint error.
zemyblue Jan 25, 2023
c545fd0
chore: apply proto-format
zemyblue Jan 25, 2023
2142b2a
Merge branch 'main' into change_proto_path3
zemyblue Jan 26, 2023
2ab8ad1
chore: modify import alias to reduce the difference previous codes.
zemyblue Jan 27, 2023
6228cf2
chore: modify import alias to reduce the difference previous codes.
zemyblue Jan 27, 2023
167616b
Update abci/client/local_client.go
zemyblue Jan 30, 2023
ad02e74
Update mempool/clist_mempool_test.go
zemyblue Jan 30, 2023
d56b882
chore: merge the changes of main branch
zemyblue Jan 31, 2023
2b1fa41
chore: change import alias of `ocprivvalproto` and `tmprivvalproto`
zemyblue Jan 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: clean up the PublicKey of ostracon/crypto/keys message and …
…`AuthSigMessage` of `ostracon/p2p/conn`
  • Loading branch information
zemyblue committed Jan 23, 2023
commit 02f81a954fac845bb848eb50996aad89ad16a46c
2 changes: 1 addition & 1 deletion abci/example/kvstore/persistent_kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"strings"

abci "github.com/tendermint/tendermint/abci/types"
pc "github.com/tendermint/tendermint/proto/tendermint/crypto"
dbm "github.com/tendermint/tm-db"

"github.com/line/ostracon/abci/example/code"
ocabci "github.com/line/ostracon/abci/types"
cryptoenc "github.com/line/ostracon/crypto/encoding"
"github.com/line/ostracon/libs/log"
pc "github.com/line/ostracon/proto/ostracon/crypto"
)

const (
Expand Down
239 changes: 119 additions & 120 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion crypto/encoding/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package encoding
import (
"fmt"

pc "github.com/tendermint/tendermint/proto/tendermint/crypto"

"github.com/line/ostracon/crypto"
"github.com/line/ostracon/crypto/ed25519"
"github.com/line/ostracon/crypto/secp256k1"
"github.com/line/ostracon/libs/json"
pc "github.com/line/ostracon/proto/ostracon/crypto"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions p2p/conn/evil_secret_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
gogotypes "github.com/gogo/protobuf/types"
"github.com/gtank/merlin"
"github.com/stretchr/testify/assert"
tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p"
"golang.org/x/crypto/chacha20poly1305"

"github.com/line/ostracon/crypto"
"github.com/line/ostracon/crypto/ed25519"
cryptoenc "github.com/line/ostracon/crypto/encoding"
"github.com/line/ostracon/libs/protoio"
ocp2p "github.com/line/ostracon/proto/ostracon/p2p"
)

type buffer struct {
Expand Down Expand Up @@ -117,7 +117,7 @@ func (c *evilConn) Read(data []byte) (n int, err error) {
if err != nil {
panic(err)
}
bz, err := protoio.MarshalDelimited(&ocp2p.AuthSigMessage{PubKey: pkpb, Sig: signature})
bz, err := protoio.MarshalDelimited(&tmp2p.AuthSigMessage{PubKey: pkpb, Sig: signature})
if err != nil {
panic(err)
}
Expand Down
6 changes: 3 additions & 3 deletions p2p/conn/secret_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
gogotypes "github.com/gogo/protobuf/types"
"github.com/gtank/merlin"
pool "github.com/libp2p/go-buffer-pool"
tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/curve25519"
"golang.org/x/crypto/hkdf"
Expand All @@ -27,7 +28,6 @@ import (
"github.com/line/ostracon/libs/async"
"github.com/line/ostracon/libs/protoio"
tmsync "github.com/line/ostracon/libs/sync"
ocp2p "github.com/line/ostracon/proto/ostracon/p2p"
)

// 4 + 1024 == 1028 total frame size
Expand Down Expand Up @@ -406,14 +406,14 @@ func shareAuthSignature(sc io.ReadWriter, pubKey crypto.PubKey, signature []byte
if err != nil {
return nil, true, err
}
_, err = protoio.NewDelimitedWriter(sc).WriteMsg(&ocp2p.AuthSigMessage{PubKey: pbpk, Sig: signature})
_, err = protoio.NewDelimitedWriter(sc).WriteMsg(&tmp2p.AuthSigMessage{PubKey: pbpk, Sig: signature})
if err != nil {
return nil, true, err // abort
}
return nil, false, nil
},
func(_ int) (val interface{}, abort bool, err error) {
var pba ocp2p.AuthSigMessage
var pba tmp2p.AuthSigMessage
_, err = protoio.NewDelimitedReader(sc, 1024*1024).ReadMsg(&pba)
if err != nil {
return nil, true, err // abort
Expand Down
2 changes: 1 addition & 1 deletion privval/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"
"time"

cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
tmprivvalproto "github.com/tendermint/tendermint/proto/tendermint/privval"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

Expand All @@ -15,7 +16,6 @@ import (
"github.com/line/ostracon/crypto/ed25519"
cryptoenc "github.com/line/ostracon/crypto/encoding"
"github.com/line/ostracon/crypto/tmhash"
cryptoproto "github.com/line/ostracon/proto/ostracon/crypto"
privvalproto "github.com/line/ostracon/proto/ostracon/privval"
"github.com/line/ostracon/types"
)
Expand Down
2 changes: 1 addition & 1 deletion privval/signer_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
tmprivvalproto "github.com/tendermint/tendermint/proto/tendermint/privval"
zemyblue marked this conversation as resolved.
Show resolved Hide resolved
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

Expand All @@ -16,7 +17,6 @@ import (
"github.com/line/ostracon/crypto/tmhash"
"github.com/line/ostracon/crypto/vrf"
tmrand "github.com/line/ostracon/libs/rand"
cryptoproto "github.com/line/ostracon/proto/ostracon/crypto"
privvalproto "github.com/line/ostracon/proto/ostracon/privval"
"github.com/line/ostracon/types"
)
Expand Down
2 changes: 1 addition & 1 deletion privval/signer_requestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package privval
import (
"fmt"

cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
tmprivvalproto "github.com/tendermint/tendermint/proto/tendermint/privval"
zemyblue marked this conversation as resolved.
Show resolved Hide resolved
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/line/ostracon/crypto"
cryptoenc "github.com/line/ostracon/crypto/encoding"
cryptoproto "github.com/line/ostracon/proto/ostracon/crypto"
privvalproto "github.com/line/ostracon/proto/ostracon/privval"
"github.com/line/ostracon/types"
)
Expand Down
4 changes: 2 additions & 2 deletions proto/ostracon/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "tendermint/crypto/proof.proto";
import "tendermint/types/params.proto";
import "tendermint/abci/types.proto";
import "ostracon/types/types.proto";
import "ostracon/crypto/keys.proto";
import "tendermint/crypto/keys.proto";
import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto";

Expand Down Expand Up @@ -368,7 +368,7 @@ message Validator {

// ValidatorUpdate
message ValidatorUpdate {
ostracon.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
int64 power = 2; // The voting power
}

Expand Down
Loading