diff --git a/go.mod b/go.mod index b7185081acb..1dbaadf9376 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 - github.com/hyperledger-labs/SmartBFT v0.0.0-20240314083322-beb702253a8c + github.com/hyperledger-labs/SmartBFT v0.0.0-20240314102917-584daefbad5b github.com/hyperledger/fabric-chaincode-go v0.0.0-20220713164125-8f0791c989d7 github.com/hyperledger/fabric-config v0.2.1 github.com/hyperledger/fabric-lib-go v1.1.1 @@ -39,12 +39,11 @@ require ( go.etcd.io/etcd/server/v3 v3.5.9 go.uber.org/zap v1.26.0 google.golang.org/grpc v1.61.0 + google.golang.org/protobuf v1.33.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/yaml.v2 v2.4.0 ) -require google.golang.org/protobuf v1.33.0 - require ( github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect diff --git a/go.sum b/go.sum index cc326125a46..3d025869965 100644 --- a/go.sum +++ b/go.sum @@ -316,8 +316,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hyperledger-labs/SmartBFT v0.0.0-20240314083322-beb702253a8c h1:WI3KhtKZ4g0A+p0vWVaqoejTwtKrL96x4pO+zXcCfA8= -github.com/hyperledger-labs/SmartBFT v0.0.0-20240314083322-beb702253a8c/go.mod h1:vP2WuYRHnbOZfik/btUpKGXI9ZrRz2hIIzjrGLvDXr8= +github.com/hyperledger-labs/SmartBFT v0.0.0-20240314102917-584daefbad5b h1:3jnnacriUAWk7BRqt6bJRCXXHe3axPcaTOACgtWIrPU= +github.com/hyperledger-labs/SmartBFT v0.0.0-20240314102917-584daefbad5b/go.mod h1:ygWtLPsiYrl58bikv1ybIQJBwRuPw9KV3Y93drGr4zU= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 h1:B1Nt8hKb//KvgGRprk0h1t4lCnwhE9/ryb1WqfZbV+M= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= github.com/hyperledger/fabric-chaincode-go v0.0.0-20220713164125-8f0791c989d7 h1:w0VDGxvAmu8WZEfAhLn9M4SJg5xWMFIxUokfflx1MaU= diff --git a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/util.go b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/util.go index eac5e8df69a..584813cb408 100644 --- a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/util.go +++ b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/util.go @@ -257,6 +257,7 @@ func (ifp *InFlightData) clear() { type ProposalMaker struct { DecisionsPerLeader uint64 N uint64 + NodesList []uint64 SelfID uint64 Decider Decider FailureDetector FailureDetector @@ -281,6 +282,7 @@ func (pm *ProposalMaker) NewProposer(leader, proposalSequence, viewNum, decision RetrieveCheckpoint: pm.Checkpoint.Get, DecisionsPerLeader: pm.DecisionsPerLeader, N: pm.N, + NodesList: pm.NodesList, LeaderID: leader, SelfID: pm.SelfID, Quorum: quorumSize, diff --git a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/view.go b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/view.go index 161bfeb2762..8fb5cf68f82 100644 --- a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/view.go +++ b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/view.go @@ -72,6 +72,7 @@ type View struct { RetrieveCheckpoint CheckpointRetriever SelfID uint64 N uint64 + NodesList []uint64 LeaderID uint64 Quorum int Number uint64 @@ -702,7 +703,7 @@ func (v *View) verifyBlacklist(prevCommitSignatures []*protos.Signature, currVer f: f, logger: v.Logger, metricsBlacklist: v.MetricsBlacklist, - nodes: v.Comm.Nodes(), + nodes: v.NodesList, currView: v.Number, } @@ -1045,7 +1046,7 @@ func (v *View) updateBlacklistMetadata(metadata *protos.ViewMetadata, prevSigs [ leaderRotation: v.DecisionsPerLeader > 0, currView: metadata.ViewId, prevMD: prevMD, - nodes: v.Comm.Nodes(), + nodes: v.NodesList, f: f, n: v.N, logger: v.Logger, diff --git a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/viewchanger.go b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/viewchanger.go index f835fee3287..b1a492269f5 100644 --- a/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/viewchanger.go +++ b/vendor/github.com/hyperledger-labs/SmartBFT/internal/bft/viewchanger.go @@ -1225,6 +1225,7 @@ func (v *ViewChanger) commitInFlightProposal(proposal *protos.Proposal) (success DecisionsPerLeader: v.DecisionsPerLeader, SelfID: v.SelfID, N: v.N, + NodesList: v.NodesList, Number: inFlightViewNum, LeaderID: v.SelfID, // so that no byzantine leader will cause a complain Quorum: v.quorum, diff --git a/vendor/github.com/hyperledger-labs/SmartBFT/pkg/consensus/consensus.go b/vendor/github.com/hyperledger-labs/SmartBFT/pkg/consensus/consensus.go index 5f5345c4efa..46c8ddeca3b 100644 --- a/vendor/github.com/hyperledger-labs/SmartBFT/pkg/consensus/consensus.go +++ b/vendor/github.com/hyperledger-labs/SmartBFT/pkg/consensus/consensus.go @@ -332,6 +332,7 @@ func (c *Consensus) proposalMaker() *algorithm.ProposalMaker { FailureDetector: c, Verifier: c.Verifier, N: c.numberOfNodes, + NodesList: c.nodes, InMsqQSize: int(c.Config.IncomingMessageBufferSize), ViewSequences: c.controller.ViewSequences, } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5c470693ac0..b8629315559 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -212,7 +212,7 @@ github.com/hashicorp/hcl/hcl/token github.com/hashicorp/hcl/json/parser github.com/hashicorp/hcl/json/scanner github.com/hashicorp/hcl/json/token -# github.com/hyperledger-labs/SmartBFT v0.0.0-20240314083322-beb702253a8c +# github.com/hyperledger-labs/SmartBFT v0.0.0-20240314102917-584daefbad5b ## explicit; go 1.20 github.com/hyperledger-labs/SmartBFT/internal/bft github.com/hyperledger-labs/SmartBFT/pkg/api