Skip to content

Commit

Permalink
change lib protobuf
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Partanskiy <[email protected]>
  • Loading branch information
pfi79 committed Sep 7, 2024
1 parent 409f8cd commit aba6324
Show file tree
Hide file tree
Showing 49 changed files with 319 additions and 11,057 deletions.
2 changes: 1 addition & 1 deletion examples/naive_chain/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
smart "github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/metrics/disabled"
"github.com/hyperledger-labs/SmartBFT/pkg/wal"
"github.com/stretchr/testify/assert"
"go.uber.org/zap"
"google.golang.org/protobuf/proto"
)

func TestTxn(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion examples/naive_chain/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"sync"
"time"

"github.com/golang/protobuf/proto"
smart "github.com/hyperledger-labs/SmartBFT/pkg/api"
smartbft "github.com/hyperledger-labs/SmartBFT/pkg/consensus"
bft "github.com/hyperledger-labs/SmartBFT/pkg/types"
"github.com/hyperledger-labs/SmartBFT/pkg/wal"
"github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

type (
Expand Down
187 changes: 130 additions & 57 deletions examples/naive_chain/test_message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/naive_chain/test_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

syntax = "proto3";

option go_package = "github.com/hyperledger-labs/SmartBFT/naive";

package naive;

message FwdMessage {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/hyperledger-labs/SmartBFT
go 1.22

require (
github.com/golang/protobuf v1.5.4
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.8.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"sync/atomic"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

// Decider delivers the proposal with signatures to the application
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/internal/bft"
"github.com/hyperledger-labs/SmartBFT/internal/bft/mocks"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
"google.golang.org/protobuf/proto"
)

func TestControllerBasic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"errors"
"fmt"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

type StateRecorder struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"sync"
"sync/atomic"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

type proposalInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"sync/atomic"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

// Phase indicates the status of the view
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"sync/atomic"
"testing"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/internal/bft"
"github.com/hyperledger-labs/SmartBFT/internal/bft/mocks"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
Expand All @@ -26,6 +25,7 @@ import (
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/proto"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/viewchanger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"sync/atomic"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/metrics/disabled"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

// ViewController controls the view
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/viewchanger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/SmartBFT/internal/bft"
"github.com/hyperledger-labs/SmartBFT/internal/bft/mocks"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/proto"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (
"sync/atomic"
"time"

"github.com/golang/protobuf/proto"
algorithm "github.com/hyperledger-labs/SmartBFT/internal/bft"
bft "github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/metrics/disabled"
"github.com/hyperledger-labs/SmartBFT/pkg/types"
protos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
"google.golang.org/protobuf/proto"
)

// Consensus submits requests to be total ordered,
Expand Down
Loading

0 comments on commit aba6324

Please sign in to comment.