diff --git a/cmd/bench/cmd/client.go b/cmd/bench/cmd/client.go index f22ab27aa..53c4128e0 100644 --- a/cmd/bench/cmd/client.go +++ b/cmd/bench/cmd/client.go @@ -14,11 +14,12 @@ import ( "strconv" "time" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/spf13/cobra" rateLimiter "golang.org/x/time/rate" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dummyclient" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/membership" diff --git a/cmd/bench/cmd/node.go b/cmd/bench/cmd/node.go index 335a3f8c2..eaf2c76f0 100644 --- a/cmd/bench/cmd/node.go +++ b/cmd/bench/cmd/node.go @@ -14,12 +14,13 @@ import ( "strconv" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" "github.com/spf13/cobra" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/cmd/bench/localtxgenerator" "github.com/filecoin-project/mir/cmd/bench/stats" diff --git a/cmd/bench/localtxgenerator/localtxgenerator.go b/cmd/bench/localtxgenerator/localtxgenerator.go index bc9029bb6..7016e1d3c 100644 --- a/cmd/bench/localtxgenerator/localtxgenerator.go +++ b/cmd/bench/localtxgenerator/localtxgenerator.go @@ -7,9 +7,10 @@ import ( "sync/atomic" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/cmd/bench/stats" "github.com/filecoin-project/mir/pkg/checkpoint" "github.com/filecoin-project/mir/pkg/logging" diff --git a/cmd/mircat/display.go b/cmd/mircat/display.go index 411648168..eab1de0dd 100644 --- a/cmd/mircat/display.go +++ b/cmd/mircat/display.go @@ -9,11 +9,12 @@ import ( "strconv" "strings" - "github.com/filecoin-project/mir/stdtypes" "github.com/ttacon/chalk" "google.golang.org/protobuf/encoding/protojson" "gopkg.in/alecthomas/kingpin.v2" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/eventlog" "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/eventpb" diff --git a/cmd/mircat/eventloader.go b/cmd/mircat/eventloader.go index b65e2968e..21888269a 100644 --- a/cmd/mircat/eventloader.go +++ b/cmd/mircat/eventloader.go @@ -9,9 +9,10 @@ import ( "sort" "strings" - t "github.com/filecoin-project/mir/stdtypes" "gopkg.in/alecthomas/kingpin.v2" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/eventlog" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/isspb" diff --git a/cmd/mircat/main.go b/cmd/mircat/main.go index 83841c105..25f60f50b 100644 --- a/cmd/mircat/main.go +++ b/cmd/mircat/main.go @@ -6,9 +6,10 @@ import ( "strings" "github.com/AlecAivazis/survey/v2" - t "github.com/filecoin-project/mir/stdtypes" "github.com/pkg/errors" "gopkg.in/alecthomas/kingpin.v2" + + t "github.com/filecoin-project/mir/stdtypes" ) // mircat is a tool for reviewing Mir state machine recordings. diff --git a/codegen/generators/dsl-gen/generator/messages.go b/codegen/generators/dsl-gen/generator/messages.go index ac11671cb..b6c3e1604 100644 --- a/codegen/generators/dsl-gen/generator/messages.go +++ b/codegen/generators/dsl-gen/generator/messages.go @@ -2,15 +2,14 @@ package generator import ( "github.com/dave/jennifer/jen" - t "github.com/filecoin-project/mir/stdtypes" - - "github.com/filecoin-project/mir/codegen/model/messages" "github.com/filecoin-project/mir/codegen" + "github.com/filecoin-project/mir/codegen/model/messages" "github.com/filecoin-project/mir/codegen/model/types" "github.com/filecoin-project/mir/codegen/util/jenutil" "github.com/filecoin-project/mir/codegen/util/params" "github.com/filecoin-project/mir/pkg/util/reflectutil" + t "github.com/filecoin-project/mir/stdtypes" ) var tNodeIDCode jen.Code = jenutil.QualFromType(reflectutil.TypeOf[t.NodeID]()) diff --git a/node.go b/node.go index 4a84533fa..893a155da 100644 --- a/node.go +++ b/node.go @@ -12,9 +12,10 @@ import ( "reflect" "sync" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/eventlog" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/modules" diff --git a/node_test.go b/node_test.go index 222c50403..e11a60578 100644 --- a/node_test.go +++ b/node_test.go @@ -8,13 +8,14 @@ import ( "testing" "time" - "github.com/filecoin-project/mir/stdevents" - "github.com/filecoin-project/mir/stdtypes" "github.com/golang/mock/gomock" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "go.uber.org/goleak" + "github.com/filecoin-project/mir/stdevents" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/modules/mockmodules" diff --git a/pkg/availability/multisigcollector/internal/parts/batchreconstruction/batchreconstruction.go b/pkg/availability/multisigcollector/internal/parts/batchreconstruction/batchreconstruction.go index 381da3f32..58e8ee9c3 100644 --- a/pkg/availability/multisigcollector/internal/parts/batchreconstruction/batchreconstruction.go +++ b/pkg/availability/multisigcollector/internal/parts/batchreconstruction/batchreconstruction.go @@ -1,9 +1,10 @@ package batchreconstruction import ( - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/availability/multisigcollector/common" msctypes "github.com/filecoin-project/mir/pkg/availability/multisigcollector/types" "github.com/filecoin-project/mir/pkg/dsl" diff --git a/pkg/availability/multisigcollector/internal/parts/certverification/certverification.go b/pkg/availability/multisigcollector/internal/parts/certverification/certverification.go index 5c921aad6..2b22fbd7b 100644 --- a/pkg/availability/multisigcollector/internal/parts/certverification/certverification.go +++ b/pkg/availability/multisigcollector/internal/parts/certverification/certverification.go @@ -3,9 +3,10 @@ package certverification import ( "errors" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/availability/multisigcollector/common" msctypes "github.com/filecoin-project/mir/pkg/availability/multisigcollector/types" "github.com/filecoin-project/mir/pkg/dsl" diff --git a/pkg/bcb/bcbmodule.go b/pkg/bcb/bcbmodule.go index e61fab538..54fce0bc0 100644 --- a/pkg/bcb/bcbmodule.go +++ b/pkg/bcb/bcbmodule.go @@ -1,9 +1,10 @@ package bcb import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/modules" bcbpbdsl "github.com/filecoin-project/mir/pkg/pb/bcbpb/dsl" diff --git a/pkg/checkpoint/certificate.go b/pkg/checkpoint/certificate.go index 9be7c7904..0480e51c8 100644 --- a/pkg/checkpoint/certificate.go +++ b/pkg/checkpoint/certificate.go @@ -1,10 +1,11 @@ package checkpoint import ( - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/util/maputil" ) diff --git a/pkg/checkpoint/checkpoint.go b/pkg/checkpoint/checkpoint.go index 769e85493..2a3d51045 100644 --- a/pkg/checkpoint/checkpoint.go +++ b/pkg/checkpoint/checkpoint.go @@ -3,11 +3,12 @@ package checkpoint import ( "reflect" - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" es "github.com/go-errors/errors" "google.golang.org/protobuf/proto" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/clientprogress" "github.com/filecoin-project/mir/pkg/crypto" "github.com/filecoin-project/mir/pkg/logging" diff --git a/pkg/checkpoint/chkpvalidator/conservativecv.go b/pkg/checkpoint/chkpvalidator/conservativecv.go index 441d579d6..3519af215 100644 --- a/pkg/checkpoint/chkpvalidator/conservativecv.go +++ b/pkg/checkpoint/chkpvalidator/conservativecv.go @@ -1,9 +1,10 @@ package chkpvalidator import ( - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/checkpoint" "github.com/filecoin-project/mir/pkg/crypto" checkpointpbtypes "github.com/filecoin-project/mir/pkg/pb/checkpointpb/types" diff --git a/pkg/checkpoint/chkpvalidator/permissivecv.go b/pkg/checkpoint/chkpvalidator/permissivecv.go index 0523d5397..d7527cbe1 100644 --- a/pkg/checkpoint/chkpvalidator/permissivecv.go +++ b/pkg/checkpoint/chkpvalidator/permissivecv.go @@ -1,9 +1,10 @@ package chkpvalidator import ( - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/checkpoint" diff --git a/pkg/checkpoint/protocol.go b/pkg/checkpoint/protocol.go index 001a37881..3d9b56334 100644 --- a/pkg/checkpoint/protocol.go +++ b/pkg/checkpoint/protocol.go @@ -6,9 +6,10 @@ import ( "bytes" "time" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/modules" diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index d065861d4..96a78bd32 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -3,7 +3,6 @@ package crypto import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/filecoin-project/mir/pkg/modules" @@ -11,6 +10,7 @@ import ( cryptopbevents "github.com/filecoin-project/mir/pkg/pb/cryptopb/events" cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" "github.com/filecoin-project/mir/pkg/pb/eventpb" + "github.com/filecoin-project/mir/stdtypes" ) type MirModule struct { diff --git a/pkg/crypto/defaultimpl.go b/pkg/crypto/defaultimpl.go index 3236376d4..5ea5da902 100644 --- a/pkg/crypto/defaultimpl.go +++ b/pkg/crypto/defaultimpl.go @@ -20,8 +20,9 @@ import ( "os" "strings" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + + t "github.com/filecoin-project/mir/stdtypes" ) // DefaultImpl represents a generic implementation of the MirModule module that can be used at Node instantiation diff --git a/pkg/crypto/dummy.go b/pkg/crypto/dummy.go index c8974e9f8..6f6fb0304 100644 --- a/pkg/crypto/dummy.go +++ b/pkg/crypto/dummy.go @@ -9,8 +9,9 @@ package crypto import ( "bytes" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + + t "github.com/filecoin-project/mir/stdtypes" ) // TODO: Write comments. diff --git a/pkg/crypto/hasher.go b/pkg/crypto/hasher.go index b8b6d3ef9..035538b29 100644 --- a/pkg/crypto/hasher.go +++ b/pkg/crypto/hasher.go @@ -3,9 +3,10 @@ package crypto import ( "hash" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/hasherpb" diff --git a/pkg/crypto/pseudo.go b/pkg/crypto/pseudo.go index ca9a8aad5..8094f6000 100644 --- a/pkg/crypto/pseudo.go +++ b/pkg/crypto/pseudo.go @@ -9,8 +9,9 @@ package crypto import ( insecureRNG "math/rand" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + + t "github.com/filecoin-project/mir/stdtypes" ) var ( diff --git a/pkg/deploytest/deployment.go b/pkg/deploytest/deployment.go index c8bf2c674..d61ee662e 100644 --- a/pkg/deploytest/deployment.go +++ b/pkg/deploytest/deployment.go @@ -15,9 +15,10 @@ import ( "sync" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/dummyclient" "github.com/filecoin-project/mir/pkg/logging" diff --git a/pkg/deploytest/locallibp2ptransport.go b/pkg/deploytest/locallibp2ptransport.go index cfb1d96a7..82aedacde 100644 --- a/pkg/deploytest/locallibp2ptransport.go +++ b/pkg/deploytest/locallibp2ptransport.go @@ -1,10 +1,11 @@ package deploytest import ( - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/libp2p/go-libp2p/core/host" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/logging" diff --git a/pkg/deploytest/simtimer.go b/pkg/deploytest/simtimer.go index 88b561b82..1ab5a4eee 100644 --- a/pkg/deploytest/simtimer.go +++ b/pkg/deploytest/simtimer.go @@ -8,9 +8,10 @@ import ( "context" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/testsim" diff --git a/pkg/deploytest/testreplica.go b/pkg/deploytest/testreplica.go index 5acb296d1..d037fc607 100644 --- a/pkg/deploytest/testreplica.go +++ b/pkg/deploytest/testreplica.go @@ -7,9 +7,10 @@ import ( "strconv" "sync" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/eventlog" "github.com/filecoin-project/mir/pkg/logging" diff --git a/pkg/dsl/dslmodule.go b/pkg/dsl/dslmodule.go index 47399c204..d624489ae 100644 --- a/pkg/dsl/dslmodule.go +++ b/pkg/dsl/dslmodule.go @@ -3,7 +3,6 @@ package dsl import ( "reflect" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" cs "github.com/filecoin-project/mir/pkg/contextstore" @@ -11,6 +10,7 @@ import ( "github.com/filecoin-project/mir/pkg/pb/eventpb" eventpbtypes "github.com/filecoin-project/mir/pkg/pb/eventpb/types" "github.com/filecoin-project/mir/pkg/util/reflectutil" + "github.com/filecoin-project/mir/stdtypes" ) type dslModuleImpl struct { diff --git a/pkg/dsl/test/dslmodule_test.go b/pkg/dsl/test/dslmodule_test.go index 8501cd315..7c5ccd7cc 100644 --- a/pkg/dsl/test/dslmodule_test.go +++ b/pkg/dsl/test/dslmodule_test.go @@ -6,11 +6,12 @@ import ( "strconv" "testing" - "github.com/filecoin-project/mir/stdevents" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/stretchr/testify/assert" + "github.com/filecoin-project/mir/stdevents" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/cryptopb" diff --git a/pkg/dummyclient/dummyclient.go b/pkg/dummyclient/dummyclient.go index 0ffc7bf3b..4f25acc45 100644 --- a/pkg/dummyclient/dummyclient.go +++ b/pkg/dummyclient/dummyclient.go @@ -12,11 +12,12 @@ import ( "fmt" "sync" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" "github.com/filecoin-project/mir/pkg/transactionreceiver" diff --git a/pkg/eventlog/eventwritergzip.go b/pkg/eventlog/eventwritergzip.go index 7d3319c3b..fe7c5193c 100644 --- a/pkg/eventlog/eventwritergzip.go +++ b/pkg/eventlog/eventwritergzip.go @@ -6,7 +6,6 @@ import ( "io" "os" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/pkg/errors" "google.golang.org/protobuf/proto" @@ -14,6 +13,7 @@ import ( "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/recordingpb" + "github.com/filecoin-project/mir/stdtypes" ) type gzipWriter struct { diff --git a/pkg/eventlog/eventwritersqlite.go b/pkg/eventlog/eventwritersqlite.go index c00aa49ab..3b9a8d16f 100644 --- a/pkg/eventlog/eventwritersqlite.go +++ b/pkg/eventlog/eventwritersqlite.go @@ -4,13 +4,13 @@ import ( "database/sql" "fmt" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" _ "github.com/mattn/go-sqlite3" // Driver for the sql database "google.golang.org/protobuf/encoding/protojson" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/pb/eventpb" + t "github.com/filecoin-project/mir/stdtypes" ) const ( diff --git a/pkg/eventlog/recorder.go b/pkg/eventlog/recorder.go index 5816e62d6..351ea93da 100644 --- a/pkg/eventlog/recorder.go +++ b/pkg/eventlog/recorder.go @@ -16,11 +16,11 @@ import ( "sync" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/pkg/errors" "github.com/filecoin-project/mir/pkg/logging" + "github.com/filecoin-project/mir/stdtypes" ) type EventRecord struct { diff --git a/pkg/eventmangler/eventmangler.go b/pkg/eventmangler/eventmangler.go index f77743f41..cc43b7d8a 100644 --- a/pkg/eventmangler/eventmangler.go +++ b/pkg/eventmangler/eventmangler.go @@ -4,7 +4,6 @@ import ( "math/rand" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/filecoin-project/mir/pkg/dsl" @@ -13,6 +12,7 @@ import ( eventpbdsl "github.com/filecoin-project/mir/pkg/pb/eventpb/dsl" eventpbtypes "github.com/filecoin-project/mir/pkg/pb/eventpb/types" "github.com/filecoin-project/mir/pkg/timer/types" + "github.com/filecoin-project/mir/stdtypes" ) type ModuleConfig struct { diff --git a/pkg/factorymodule/factory.go b/pkg/factorymodule/factory.go index 28f15adcb..2d372c86a 100644 --- a/pkg/factorymodule/factory.go +++ b/pkg/factorymodule/factory.go @@ -3,10 +3,11 @@ package factorymodule import ( "fmt" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "google.golang.org/protobuf/proto" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/messagebuffer" "github.com/filecoin-project/mir/pkg/modules" diff --git a/pkg/factorymodule/factory_test.go b/pkg/factorymodule/factory_test.go index ab9000856..9cb21fd66 100644 --- a/pkg/factorymodule/factory_test.go +++ b/pkg/factorymodule/factory_test.go @@ -5,12 +5,13 @@ import ( "sort" "testing" - "github.com/filecoin-project/mir/stdevents" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/stretchr/testify/assert" "go.uber.org/goleak" + "github.com/filecoin-project/mir/stdevents" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/eventpb" diff --git a/pkg/iss/iss.go b/pkg/iss/iss.go index 9f8a44690..23a1c3525 100644 --- a/pkg/iss/iss.go +++ b/pkg/iss/iss.go @@ -15,10 +15,11 @@ import ( "encoding/binary" "fmt" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "google.golang.org/protobuf/proto" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/checkpoint" "github.com/filecoin-project/mir/pkg/clientprogress" "github.com/filecoin-project/mir/pkg/crypto" diff --git a/pkg/iss/leaderselectionpolicy/blacklist.go b/pkg/iss/leaderselectionpolicy/blacklist.go index e778d72c1..5a00934bd 100644 --- a/pkg/iss/leaderselectionpolicy/blacklist.go +++ b/pkg/iss/leaderselectionpolicy/blacklist.go @@ -3,9 +3,10 @@ package leaderselectionpolicy import ( "sort" - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" + t "github.com/filecoin-project/mir/stdtypes" + trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/util/maputil" diff --git a/pkg/iss/leaderselectionpolicy/leaderselectionpolicy.go b/pkg/iss/leaderselectionpolicy/leaderselectionpolicy.go index 9cefb625e..bfd7ed2bf 100644 --- a/pkg/iss/leaderselectionpolicy/leaderselectionpolicy.go +++ b/pkg/iss/leaderselectionpolicy/leaderselectionpolicy.go @@ -3,12 +3,12 @@ package leaderselectionpolicy import ( "sync" - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" es "github.com/go-errors/errors" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" + t "github.com/filecoin-project/mir/stdtypes" ) type LeaderPolicyType string diff --git a/pkg/iss/leaderselectionpolicy/leaderselectionpolicy_test.go b/pkg/iss/leaderselectionpolicy/leaderselectionpolicy_test.go index 2d7815844..1f419edbd 100644 --- a/pkg/iss/leaderselectionpolicy/leaderselectionpolicy_test.go +++ b/pkg/iss/leaderselectionpolicy/leaderselectionpolicy_test.go @@ -3,10 +3,11 @@ package leaderselectionpolicy import ( "testing" - "github.com/filecoin-project/mir/stdtypes" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/filecoin-project/mir/stdtypes" + trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/util/maputil" diff --git a/pkg/iss/leaderselectionpolicy/simple.go b/pkg/iss/leaderselectionpolicy/simple.go index fefc322b0..9d55c63d1 100644 --- a/pkg/iss/leaderselectionpolicy/simple.go +++ b/pkg/iss/leaderselectionpolicy/simple.go @@ -1,9 +1,10 @@ package leaderselectionpolicy import ( - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" + t "github.com/filecoin-project/mir/stdtypes" + trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/util/maputil" diff --git a/pkg/membership/bootstrap.go b/pkg/membership/bootstrap.go index 4ae0f2643..af6f22901 100644 --- a/pkg/membership/bootstrap.go +++ b/pkg/membership/bootstrap.go @@ -7,11 +7,12 @@ import ( "strconv" "strings" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" + t "github.com/filecoin-project/mir/stdtypes" + trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" libp2ptools "github.com/filecoin-project/mir/pkg/util/libp2p" diff --git a/pkg/messagebuffer/messagebuffer.go b/pkg/messagebuffer/messagebuffer.go index 879a91232..33c2f5bb2 100644 --- a/pkg/messagebuffer/messagebuffer.go +++ b/pkg/messagebuffer/messagebuffer.go @@ -22,10 +22,10 @@ package messagebuffer import ( "container/list" - t "github.com/filecoin-project/mir/stdtypes" "google.golang.org/protobuf/proto" "github.com/filecoin-project/mir/pkg/logging" + t "github.com/filecoin-project/mir/stdtypes" ) // Applicable is an enum-style type representing the status of a message stored in the message buffer. diff --git a/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go b/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go index 792ec6093..38545e079 100644 --- a/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go +++ b/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go @@ -7,8 +7,9 @@ package mock_internal import ( reflect "reflect" - stdtypes "github.com/filecoin-project/mir/stdtypes" gomock "github.com/golang/mock/gomock" + + stdtypes "github.com/filecoin-project/mir/stdtypes" ) // MockModuleImpl is a mock of ModuleImpl interface. diff --git a/pkg/net/grpc/grpctransport.go b/pkg/net/grpc/grpctransport.go index 46e02c5e3..f6efe8bcf 100644 --- a/pkg/net/grpc/grpctransport.go +++ b/pkg/net/grpc/grpctransport.go @@ -12,7 +12,6 @@ import ( "net" "sync" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" @@ -20,6 +19,8 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/peer" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" mirnet "github.com/filecoin-project/mir/pkg/net" "github.com/filecoin-project/mir/pkg/pb/eventpb" diff --git a/pkg/net/grpc/grpctransport.pb.go b/pkg/net/grpc/grpctransport.pb.go index 9d1955569..44acf69a8 100644 --- a/pkg/net/grpc/grpctransport.pb.go +++ b/pkg/net/grpc/grpctransport.pb.go @@ -12,11 +12,13 @@ package grpc import ( - messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" ) const ( diff --git a/pkg/net/grpc/grpctransport_grpc.pb.go b/pkg/net/grpc/grpctransport_grpc.pb.go index ba59dbbbe..9740e0d71 100644 --- a/pkg/net/grpc/grpctransport_grpc.pb.go +++ b/pkg/net/grpc/grpctransport_grpc.pb.go @@ -4,6 +4,7 @@ package grpc import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/net/libp2p/remoteconnection.go b/pkg/net/libp2p/remoteconnection.go index bb69532d5..ffe74f0e0 100644 --- a/pkg/net/libp2p/remoteconnection.go +++ b/pkg/net/libp2p/remoteconnection.go @@ -7,7 +7,6 @@ import ( "sync" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" @@ -15,6 +14,8 @@ import ( "github.com/libp2p/go-yamux/v4" "google.golang.org/protobuf/proto" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/pb/messagepb" ) diff --git a/pkg/net/libp2p/selfconnection.go b/pkg/net/libp2p/selfconnection.go index 88d167b5f..367c3e167 100644 --- a/pkg/net/libp2p/selfconnection.go +++ b/pkg/net/libp2p/selfconnection.go @@ -1,10 +1,11 @@ package libp2p import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/libp2p/go-libp2p/core/peer" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/pb/messagepb" messagepbtypes "github.com/filecoin-project/mir/pkg/pb/messagepb/types" transportpbevents "github.com/filecoin-project/mir/pkg/pb/transportpb/events" diff --git a/pkg/net/libp2p/transport.go b/pkg/net/libp2p/transport.go index cb3c0f397..48e53acfe 100644 --- a/pkg/net/libp2p/transport.go +++ b/pkg/net/libp2p/transport.go @@ -5,7 +5,6 @@ import ( "sync" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" @@ -13,6 +12,8 @@ import ( "github.com/multiformats/go-multiaddr" "google.golang.org/protobuf/proto" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/messagepb" diff --git a/pkg/net/libp2p/transport_test.go b/pkg/net/libp2p/transport_test.go index bc98be752..769e70cf8 100644 --- a/pkg/net/libp2p/transport_test.go +++ b/pkg/net/libp2p/transport_test.go @@ -9,12 +9,13 @@ import ( "testing" "time" - "github.com/filecoin-project/mir/stdtypes" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" "github.com/stretchr/testify/require" "go.uber.org/goleak" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/messagepb" diff --git a/pkg/orderers/common/segment.go b/pkg/orderers/common/segment.go index 190b5bf32..2382a4f1a 100644 --- a/pkg/orderers/common/segment.go +++ b/pkg/orderers/common/segment.go @@ -1,7 +1,6 @@ package common import ( - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/filecoin-project/mir/pkg/orderers/types" @@ -9,6 +8,7 @@ import ( trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/util/maputil" + t "github.com/filecoin-project/mir/stdtypes" ) // The Segment type represents an ISS Segment. diff --git a/pkg/orderers/internal/common/common.go b/pkg/orderers/internal/common/common.go index 9dfb897d9..788564d21 100644 --- a/pkg/orderers/internal/common/common.go +++ b/pkg/orderers/internal/common/common.go @@ -1,9 +1,10 @@ package common import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/messagebuffer" diff --git a/pkg/orderers/internal/common/pbftviewchangestate.go b/pkg/orderers/internal/common/pbftviewchangestate.go index da1b872b7..ac3fcbb59 100644 --- a/pkg/orderers/internal/common/pbftviewchangestate.go +++ b/pkg/orderers/internal/common/pbftviewchangestate.go @@ -4,9 +4,10 @@ import ( "bytes" "sort" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + ot "github.com/filecoin-project/mir/pkg/orderers/types" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" diff --git a/pkg/orderers/internal/parts/goodcase/pbftgoodcase.go b/pkg/orderers/internal/parts/goodcase/pbftgoodcase.go index 765d54e86..ffcf2c0f7 100644 --- a/pkg/orderers/internal/parts/goodcase/pbftgoodcase.go +++ b/pkg/orderers/internal/parts/goodcase/pbftgoodcase.go @@ -3,9 +3,10 @@ package goodcase import ( "fmt" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + t "github.com/filecoin-project/mir/stdtypes" + common2 "github.com/filecoin-project/mir/pkg/orderers/common" "github.com/filecoin-project/mir/pkg/orderers/internal/parts/catchup" isspbdsl "github.com/filecoin-project/mir/pkg/pb/isspb/dsl" diff --git a/pkg/orderers/internal/parts/viewchange/pbftviewchange.go b/pkg/orderers/internal/parts/viewchange/pbftviewchange.go index 595e880b4..8add141be 100644 --- a/pkg/orderers/internal/parts/viewchange/pbftviewchange.go +++ b/pkg/orderers/internal/parts/viewchange/pbftviewchange.go @@ -3,10 +3,11 @@ package viewchange import ( "bytes" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "google.golang.org/protobuf/proto" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/messagebuffer" @@ -206,7 +207,7 @@ func IncludeViewChange( //nolint:gocognit // Feed all obtained ViewChange messages to the view change state. for i, signedViewChange := range context.SignedViewChanges { - vcState.AddSignedViewChange(signedViewChange, t.NodeID(context.ViewChangeSenders[i]), logger) + vcState.AddSignedViewChange(signedViewChange, context.ViewChangeSenders[i], logger) } // If the obtained ViewChange messages are not sufficient to infer all re-proposals, ignore NewView message. diff --git a/pkg/pb/apppb/apppb.pb.go b/pkg/pb/apppb/apppb.pb.go index 3c9649529..69e092ff6 100644 --- a/pkg/pb/apppb/apppb.pb.go +++ b/pkg/pb/apppb/apppb.pb.go @@ -7,12 +7,14 @@ package apppb import ( - checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/availabilitypb/availabilitypb.pb.go b/pkg/pb/availabilitypb/availabilitypb.pb.go index 6861e7bed..3cca98bb8 100644 --- a/pkg/pb/availabilitypb/availabilitypb.pb.go +++ b/pkg/pb/availabilitypb/availabilitypb.pb.go @@ -7,15 +7,17 @@ package availabilitypb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go index 54a89d402..fe9f001b1 100644 --- a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go +++ b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go @@ -7,14 +7,16 @@ package batchdbpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go index 9359884b6..3d5731987 100644 --- a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go +++ b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go @@ -7,13 +7,15 @@ package mscpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go index f67eaeecf..517b68884 100644 --- a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go +++ b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go @@ -7,12 +7,14 @@ package batchfetcherpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) const ( diff --git a/pkg/pb/bcbpb/bcbpb.pb.go b/pkg/pb/bcbpb/bcbpb.pb.go index 1afb864eb..722d2baa5 100644 --- a/pkg/pb/bcbpb/bcbpb.pb.go +++ b/pkg/pb/bcbpb/bcbpb.pb.go @@ -7,12 +7,14 @@ package bcbpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/checkpointpb/checkpointpb.pb.go b/pkg/pb/checkpointpb/checkpointpb.pb.go index 8e663f0e7..db40e9178 100644 --- a/pkg/pb/checkpointpb/checkpointpb.pb.go +++ b/pkg/pb/checkpointpb/checkpointpb.pb.go @@ -7,13 +7,15 @@ package checkpointpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go index 00a7367f3..ed8e34b86 100644 --- a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go +++ b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go @@ -7,15 +7,17 @@ package chkpvalidatorpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/contextstorepb/contextstorepb.pb.go b/pkg/pb/contextstorepb/contextstorepb.pb.go index 91d4deb90..3e64adb2f 100644 --- a/pkg/pb/contextstorepb/contextstorepb.pb.go +++ b/pkg/pb/contextstorepb/contextstorepb.pb.go @@ -7,11 +7,13 @@ package contextstorepb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/cryptopb/cryptopb.pb.go b/pkg/pb/cryptopb/cryptopb.pb.go index 69fb8f1c7..0fe73c69c 100644 --- a/pkg/pb/cryptopb/cryptopb.pb.go +++ b/pkg/pb/cryptopb/cryptopb.pb.go @@ -7,13 +7,15 @@ package cryptopb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/dslpb/dslpb.pb.go b/pkg/pb/dslpb/dslpb.pb.go index 9080eddbb..607cd560b 100644 --- a/pkg/pb/dslpb/dslpb.pb.go +++ b/pkg/pb/dslpb/dslpb.pb.go @@ -7,11 +7,13 @@ package dslpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/eventpb/eventpb.pb.go b/pkg/pb/eventpb/eventpb.pb.go index 196f19a3b..eaf26e849 100644 --- a/pkg/pb/eventpb/eventpb.pb.go +++ b/pkg/pb/eventpb/eventpb.pb.go @@ -7,6 +7,13 @@ package eventpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -26,11 +33,6 @@ import ( testerpb "github.com/filecoin-project/mir/pkg/pb/testerpb" threshcryptopb "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" transportpb "github.com/filecoin-project/mir/pkg/pb/transportpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/eventpb/oneof_interfaces.mir.go b/pkg/pb/eventpb/oneof_interfaces.mir.go index 2baab82b9..c33cd9e75 100644 --- a/pkg/pb/eventpb/oneof_interfaces.mir.go +++ b/pkg/pb/eventpb/oneof_interfaces.mir.go @@ -3,6 +3,8 @@ package eventpb import ( + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -21,7 +23,6 @@ import ( testerpb "github.com/filecoin-project/mir/pkg/pb/testerpb" threshcryptopb "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" transportpb "github.com/filecoin-project/mir/pkg/pb/transportpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" ) type Event_Type = isEvent_Type diff --git a/pkg/pb/eventpb/types/types.mir.go b/pkg/pb/eventpb/types/types.mir.go index fca8c1c96..999f8f394 100644 --- a/pkg/pb/eventpb/types/types.mir.go +++ b/pkg/pb/eventpb/types/types.mir.go @@ -3,6 +3,8 @@ package eventpbtypes import ( + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" types19 "github.com/filecoin-project/mir/codegen/model/types" types12 "github.com/filecoin-project/mir/pkg/pb/apppb/types" @@ -28,7 +30,6 @@ import ( types20 "github.com/filecoin-project/mir/pkg/trantor/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" stdtypes "github.com/filecoin-project/mir/stdtypes" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" ) type Event struct { diff --git a/pkg/pb/factorypb/factorypb.pb.go b/pkg/pb/factorypb/factorypb.pb.go index 5c67ad944..67ecae278 100644 --- a/pkg/pb/factorypb/factorypb.pb.go +++ b/pkg/pb/factorypb/factorypb.pb.go @@ -7,15 +7,17 @@ package factorypb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" ordererpb "github.com/filecoin-project/mir/pkg/pb/ordererpb" pprepvalidatorpb "github.com/filecoin-project/mir/pkg/pb/ordererpb/pprepvalidatorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/hasherpb/hasherpb.pb.go b/pkg/pb/hasherpb/hasherpb.pb.go index bdcb02a27..0968279d5 100644 --- a/pkg/pb/hasherpb/hasherpb.pb.go +++ b/pkg/pb/hasherpb/hasherpb.pb.go @@ -7,13 +7,15 @@ package hasherpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/isspb/isspb.pb.go b/pkg/pb/isspb/isspb.pb.go index fd0b5e164..a82c4226c 100644 --- a/pkg/pb/isspb/isspb.pb.go +++ b/pkg/pb/isspb/isspb.pb.go @@ -12,15 +12,17 @@ package isspb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/mempoolpb/mempoolpb.pb.go b/pkg/pb/mempoolpb/mempoolpb.pb.go index e810f3df6..4b2daa9a9 100644 --- a/pkg/pb/mempoolpb/mempoolpb.pb.go +++ b/pkg/pb/mempoolpb/mempoolpb.pb.go @@ -7,14 +7,16 @@ package mempoolpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/messagepb/messagepb.pb.go b/pkg/pb/messagepb/messagepb.pb.go index a066b49e6..2808414b6 100644 --- a/pkg/pb/messagepb/messagepb.pb.go +++ b/pkg/pb/messagepb/messagepb.pb.go @@ -12,6 +12,12 @@ package messagepb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" bcbpb "github.com/filecoin-project/mir/pkg/pb/bcbpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" @@ -20,10 +26,6 @@ import ( _ "github.com/filecoin-project/mir/pkg/pb/net" ordererpb "github.com/filecoin-project/mir/pkg/pb/ordererpb" pingpongpb "github.com/filecoin-project/mir/pkg/pb/pingpongpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/mir/codegen_extensions.pb.go b/pkg/pb/mir/codegen_extensions.pb.go index 7e20985ec..d351e83fd 100644 --- a/pkg/pb/mir/codegen_extensions.pb.go +++ b/pkg/pb/mir/codegen_extensions.pb.go @@ -7,10 +7,11 @@ package mir import ( + reflect "reflect" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" ) const ( diff --git a/pkg/pb/net/codegen_extensions.pb.go b/pkg/pb/net/codegen_extensions.pb.go index 8175c8679..403befbc2 100644 --- a/pkg/pb/net/codegen_extensions.pb.go +++ b/pkg/pb/net/codegen_extensions.pb.go @@ -7,10 +7,11 @@ package net import ( + reflect "reflect" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" ) const ( diff --git a/pkg/pb/ordererpb/ordererpb.pb.go b/pkg/pb/ordererpb/ordererpb.pb.go index 17e23731f..a3477ff3b 100644 --- a/pkg/pb/ordererpb/ordererpb.pb.go +++ b/pkg/pb/ordererpb/ordererpb.pb.go @@ -7,14 +7,16 @@ package ordererpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" pbftpb "github.com/filecoin-project/mir/pkg/pb/pbftpb" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go index 84f7d8e91..c7201fdf5 100644 --- a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go +++ b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go @@ -7,15 +7,17 @@ package pprepvalidatorpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" pbftpb "github.com/filecoin-project/mir/pkg/pb/pbftpb" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/pbftpb/pbftpb.pb.go b/pkg/pb/pbftpb/pbftpb.pb.go index 9939ec62e..11d669f26 100644 --- a/pkg/pb/pbftpb/pbftpb.pb.go +++ b/pkg/pb/pbftpb/pbftpb.pb.go @@ -7,12 +7,14 @@ package pbftpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/pingpongpb/pingpongpb.pb.go b/pkg/pb/pingpongpb/pingpongpb.pb.go index 2f88aec7c..cbc09894d 100644 --- a/pkg/pb/pingpongpb/pingpongpb.pb.go +++ b/pkg/pb/pingpongpb/pingpongpb.pb.go @@ -7,12 +7,14 @@ package pingpongpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/recordingpb/recordingpb.pb.go b/pkg/pb/recordingpb/recordingpb.pb.go index 2585b98fa..a227c43ee 100644 --- a/pkg/pb/recordingpb/recordingpb.pb.go +++ b/pkg/pb/recordingpb/recordingpb.pb.go @@ -12,11 +12,13 @@ package recordingpb import ( - eventpb "github.com/filecoin-project/mir/pkg/pb/eventpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + eventpb "github.com/filecoin-project/mir/pkg/pb/eventpb" ) const ( diff --git a/pkg/pb/testerpb/testerpb.pb.go b/pkg/pb/testerpb/testerpb.pb.go index 7dedd89c7..715d93661 100644 --- a/pkg/pb/testerpb/testerpb.pb.go +++ b/pkg/pb/testerpb/testerpb.pb.go @@ -7,11 +7,13 @@ package testerpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/threshcryptopb/threshcryptopb.pb.go b/pkg/pb/threshcryptopb/threshcryptopb.pb.go index ec5a9e6d9..41f2b2c1d 100644 --- a/pkg/pb/threshcryptopb/threshcryptopb.pb.go +++ b/pkg/pb/threshcryptopb/threshcryptopb.pb.go @@ -7,13 +7,15 @@ package threshcryptopb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/transportpb/transportpb.pb.go b/pkg/pb/transportpb/transportpb.pb.go index 838b5e797..9c7f1d82e 100644 --- a/pkg/pb/transportpb/transportpb.pb.go +++ b/pkg/pb/transportpb/transportpb.pb.go @@ -7,12 +7,14 @@ package transportpb import ( - messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/trantorpb/trantorpb.pb.go b/pkg/pb/trantorpb/trantorpb.pb.go index 2822c2872..8b3089570 100644 --- a/pkg/pb/trantorpb/trantorpb.pb.go +++ b/pkg/pb/trantorpb/trantorpb.pb.go @@ -7,11 +7,13 @@ package trantorpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/threshcrypto/dummy.go b/pkg/threshcrypto/dummy.go index 18cdd2232..4c83b36fe 100644 --- a/pkg/threshcrypto/dummy.go +++ b/pkg/threshcrypto/dummy.go @@ -3,8 +3,9 @@ package threshcrypto import ( "bytes" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + + t "github.com/filecoin-project/mir/stdtypes" ) // DummyCrypto represents a dummy MirModule module that diff --git a/pkg/threshcrypto/pseudo.go b/pkg/threshcrypto/pseudo.go index 7c1043eb3..7365c3da7 100644 --- a/pkg/threshcrypto/pseudo.go +++ b/pkg/threshcrypto/pseudo.go @@ -5,9 +5,10 @@ import ( prand "math/rand" "github.com/drand/kyber/util/random" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "golang.org/x/exp/slices" + + t "github.com/filecoin-project/mir/stdtypes" ) var ( diff --git a/pkg/threshcrypto/tbls.go b/pkg/threshcrypto/tbls.go index 768cca47d..4b62ad92a 100644 --- a/pkg/threshcrypto/tbls.go +++ b/pkg/threshcrypto/tbls.go @@ -13,9 +13,10 @@ import ( "github.com/drand/kyber/share" "github.com/drand/kyber/sign" "github.com/drand/kyber/sign/tbls" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "golang.org/x/exp/slices" + + t "github.com/filecoin-project/mir/stdtypes" ) // TBLSInst an instance of a BLS-based (t, len(members))-threshold signature scheme diff --git a/pkg/threshcrypto/tbls_test.go b/pkg/threshcrypto/tbls_test.go index 962c9274d..ee4009186 100644 --- a/pkg/threshcrypto/tbls_test.go +++ b/pkg/threshcrypto/tbls_test.go @@ -4,9 +4,10 @@ import ( "io" "testing" - "github.com/filecoin-project/mir/stdtypes" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/filecoin-project/mir/stdtypes" ) func TestTBLSHappySmoke(t *testing.T) { diff --git a/pkg/threshcrypto/threshcrypto.go b/pkg/threshcrypto/threshcrypto.go index 4014f12b5..0086720d6 100644 --- a/pkg/threshcrypto/threshcrypto.go +++ b/pkg/threshcrypto/threshcrypto.go @@ -3,9 +3,10 @@ package threshcrypto import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/eventpb" "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" diff --git a/pkg/transactionreceiver/transactionreceiver.go b/pkg/transactionreceiver/transactionreceiver.go index f1e850673..b983415e5 100644 --- a/pkg/transactionreceiver/transactionreceiver.go +++ b/pkg/transactionreceiver/transactionreceiver.go @@ -12,11 +12,12 @@ import ( "strconv" "sync" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "google.golang.org/grpc" "google.golang.org/grpc/peer" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/logging" mempoolpbevents "github.com/filecoin-project/mir/pkg/pb/mempoolpb/events" diff --git a/pkg/transactionreceiver/transactionreceiver.pb.go b/pkg/transactionreceiver/transactionreceiver.pb.go index c67b5b369..cef57b053 100644 --- a/pkg/transactionreceiver/transactionreceiver.pb.go +++ b/pkg/transactionreceiver/transactionreceiver.pb.go @@ -12,11 +12,13 @@ package transactionreceiver import ( - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) const ( diff --git a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go index c088751b1..85c6a8e20 100644 --- a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go +++ b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go @@ -4,10 +4,12 @@ package transactionreceiver import ( context "context" - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) // This is a compile-time assertion to ensure that this generated file diff --git a/pkg/trantor/appmodule/appmodule.go b/pkg/trantor/appmodule/appmodule.go index 795a71257..a395b88e3 100644 --- a/pkg/trantor/appmodule/appmodule.go +++ b/pkg/trantor/appmodule/appmodule.go @@ -1,9 +1,10 @@ package appmodule import ( - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/checkpoint" "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/modules" diff --git a/pkg/trantor/testing/smr_property_test.go b/pkg/trantor/testing/smr_property_test.go index 281111986..f64fde5ee 100644 --- a/pkg/trantor/testing/smr_property_test.go +++ b/pkg/trantor/testing/smr_property_test.go @@ -5,10 +5,11 @@ import ( "context" "os" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/reactivex/rxgo/v2" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/eventlog" "github.com/filecoin-project/mir/pkg/pb/batchfetcherpb" "github.com/filecoin-project/mir/pkg/pb/eventpb" diff --git a/pkg/util/issutil/leaderselectionpolicy.go b/pkg/util/issutil/leaderselectionpolicy.go index ab5a13444..f590e3b4f 100644 --- a/pkg/util/issutil/leaderselectionpolicy.go +++ b/pkg/util/issutil/leaderselectionpolicy.go @@ -10,12 +10,12 @@ import ( "sort" "sync" - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" es "github.com/go-errors/errors" "github.com/filecoin-project/mir/pkg/serializing" tt "github.com/filecoin-project/mir/pkg/trantor/types" + t "github.com/filecoin-project/mir/stdtypes" ) type LeaderPolicyType uint64 diff --git a/pkg/util/libp2p/libp2p.go b/pkg/util/libp2p/libp2p.go index ea78af23c..56991eaf5 100644 --- a/pkg/util/libp2p/libp2p.go +++ b/pkg/util/libp2p/libp2p.go @@ -5,13 +5,14 @@ import ( mrand "math/rand" "net" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/libp2p/go-libp2p" libp2pcrypto "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multiaddr" + + "github.com/filecoin-project/mir/stdtypes" ) // NewDummyHostWithPrivKey creates new dummy libp2p host with an identity diff --git a/pkg/util/membutil/membutil.go b/pkg/util/membutil/membutil.go index ef8a34777..18f9a9901 100644 --- a/pkg/util/membutil/membutil.go +++ b/pkg/util/membutil/membutil.go @@ -3,13 +3,13 @@ package membutil import ( "math/big" - t "github.com/filecoin-project/mir/stdtypes" "github.com/fxamacker/cbor/v2" es "github.com/go-errors/errors" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" "github.com/filecoin-project/mir/pkg/util/maputil" + t "github.com/filecoin-project/mir/stdtypes" ) func WeightOf(membership *trantorpbtypes.Membership, nodeIDs []t.NodeID) tt.VoteWeight { diff --git a/samples/availability-layer-demo/client.go b/samples/availability-layer-demo/client.go index 235518ef4..2fb91cdf9 100644 --- a/samples/availability-layer-demo/client.go +++ b/samples/availability-layer-demo/client.go @@ -6,10 +6,11 @@ import ( "fmt" "os" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "gopkg.in/alecthomas/kingpin.v2" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/availability/batchdb/fakebatchdb" "github.com/filecoin-project/mir/pkg/availability/multisigcollector" diff --git a/samples/availability-layer-demo/control-module.go b/samples/availability-layer-demo/control-module.go index 2a0226fa8..18048eb92 100644 --- a/samples/availability-layer-demo/control-module.go +++ b/samples/availability-layer-demo/control-module.go @@ -8,9 +8,10 @@ import ( "os" "strings" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + apbtypes "github.com/filecoin-project/mir/pkg/pb/availabilitypb/types" mempoolpbevents "github.com/filecoin-project/mir/pkg/pb/mempoolpb/events" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" diff --git a/samples/bcb-demo/client.go b/samples/bcb-demo/client.go index b3700d024..560f56725 100644 --- a/samples/bcb-demo/client.go +++ b/samples/bcb-demo/client.go @@ -5,10 +5,11 @@ import ( "fmt" "os" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "gopkg.in/alecthomas/kingpin.v2" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/bcb" mirCrypto "github.com/filecoin-project/mir/pkg/crypto" diff --git a/samples/bcb-demo/control-module.go b/samples/bcb-demo/control-module.go index c5564d7ac..24d0394f8 100644 --- a/samples/bcb-demo/control-module.go +++ b/samples/bcb-demo/control-module.go @@ -6,9 +6,10 @@ import ( "fmt" "os" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/modules" "github.com/filecoin-project/mir/pkg/pb/bcbpb" "github.com/filecoin-project/mir/pkg/pb/eventpb" diff --git a/samples/chat-demo/app.go b/samples/chat-demo/app.go index f40bd64e3..0236bffb1 100644 --- a/samples/chat-demo/app.go +++ b/samples/chat-demo/app.go @@ -19,10 +19,11 @@ import ( "os" "strings" - t "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/multiformats/go-multiaddr" + t "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/checkpoint" "github.com/filecoin-project/mir/pkg/membership" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" diff --git a/samples/chat-demo/main.go b/samples/chat-demo/main.go index 7fa4276a8..d5ac42953 100644 --- a/samples/chat-demo/main.go +++ b/samples/chat-demo/main.go @@ -21,13 +21,14 @@ import ( "os" "strconv" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" "github.com/pkg/errors" "gopkg.in/alecthomas/kingpin.v2" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir" "github.com/filecoin-project/mir/pkg/checkpoint" mircrypto "github.com/filecoin-project/mir/pkg/crypto" diff --git a/samples/pingpong/customevents/pingpongevents/dsl.go b/samples/pingpong/customevents/pingpongevents/dsl.go index bc37be3c7..02f90c0c2 100644 --- a/samples/pingpong/customevents/pingpongevents/dsl.go +++ b/samples/pingpong/customevents/pingpongevents/dsl.go @@ -3,10 +3,11 @@ package pingpongevents import ( + es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/net/grpc" t "github.com/filecoin-project/mir/stdtypes" - es "github.com/go-errors/errors" ) func UponGRPCMessage[M any](m dsl.Module, handler func(msg *M, from t.NodeID) error) { diff --git a/samples/pingpong/lowlevel/pingpong.go b/samples/pingpong/lowlevel/pingpong.go index ddd07a94f..b7ead5723 100644 --- a/samples/pingpong/lowlevel/pingpong.go +++ b/samples/pingpong/lowlevel/pingpong.go @@ -4,7 +4,6 @@ import ( "fmt" "time" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" "github.com/pkg/errors" @@ -18,6 +17,7 @@ import ( "github.com/filecoin-project/mir/pkg/pb/transportpb" transportpbevents "github.com/filecoin-project/mir/pkg/pb/transportpb/events" "github.com/filecoin-project/mir/pkg/timer/types" + "github.com/filecoin-project/mir/stdtypes" ) type Pingpong struct { diff --git a/stdevents/event-teststring.go b/stdevents/event-teststring.go index cec1c5a23..be48d39cf 100644 --- a/stdevents/event-teststring.go +++ b/stdevents/event-teststring.go @@ -6,6 +6,10 @@ import ( "github.com/filecoin-project/mir/stdtypes" ) +// TODO: Make this generic in the form of TestValue[T any] (or some subset of any) +// Then the linter will stop complaining about duplication. + +//nolint:dupl type TestString struct { mirEvent Value string diff --git a/stdevents/event-testuint.go b/stdevents/event-testuint.go index 1653d9675..778bcec05 100644 --- a/stdevents/event-testuint.go +++ b/stdevents/event-testuint.go @@ -6,6 +6,7 @@ import ( "github.com/filecoin-project/mir/stdtypes" ) +//nolint:dupl type TestUint64 struct { mirEvent Value uint64 diff --git a/stdevents/event-timerdelay.go b/stdevents/event-timerdelay.go index f4af93db6..5cea20f75 100644 --- a/stdevents/event-timerdelay.go +++ b/stdevents/event-timerdelay.go @@ -4,9 +4,10 @@ import ( "fmt" "time" + es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/pkg/util/sliceutil" "github.com/filecoin-project/mir/stdtypes" - es "github.com/go-errors/errors" ) type serializableTimerDelay struct { diff --git a/stdevents/event-timerrepeat.go b/stdevents/event-timerrepeat.go index 6ecad5fd4..4159a1511 100644 --- a/stdevents/event-timerrepeat.go +++ b/stdevents/event-timerrepeat.go @@ -4,9 +4,10 @@ import ( "fmt" "time" + es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/pkg/util/sliceutil" "github.com/filecoin-project/mir/stdtypes" - es "github.com/go-errors/errors" ) type serializableTimerRepeat struct { diff --git a/stdevents/serialization.go b/stdevents/serialization.go index 921e02b1e..b4458078c 100644 --- a/stdevents/serialization.go +++ b/stdevents/serialization.go @@ -4,8 +4,9 @@ import ( "encoding/json" "fmt" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + + "github.com/filecoin-project/mir/stdtypes" ) // eventType represents the event types in serialized events. diff --git a/stdevents/serialization_test.go b/stdevents/serialization_test.go index 0ed062c0f..a8d8cfc3a 100644 --- a/stdevents/serialization_test.go +++ b/stdevents/serialization_test.go @@ -5,8 +5,9 @@ import ( "testing" "time" - "github.com/filecoin-project/mir/stdtypes" "github.com/stretchr/testify/assert" + + "github.com/filecoin-project/mir/stdtypes" ) type fakeMessage struct { diff --git a/stdtypes/testing/eventlist_test.go b/stdtypes/testing/eventlist_test.go index c43daf00c..17d127c2d 100644 --- a/stdtypes/testing/eventlist_test.go +++ b/stdtypes/testing/eventlist_test.go @@ -4,9 +4,10 @@ package testing import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/filecoin-project/mir/stdevents" "github.com/filecoin-project/mir/stdtypes" - "github.com/stretchr/testify/assert" ) func TestEventList_Constructors(t *testing.T) { diff --git a/workers.go b/workers.go index d5421f320..51988a1ae 100644 --- a/workers.go +++ b/workers.go @@ -5,9 +5,10 @@ import ( "fmt" "runtime/debug" - "github.com/filecoin-project/mir/stdtypes" es "github.com/go-errors/errors" + "github.com/filecoin-project/mir/stdtypes" + "github.com/filecoin-project/mir/pkg/logging" "github.com/filecoin-project/mir/pkg/modules" )