-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Add SmartBFT consensus support #3781
Conversation
46f6a1d
to
d8996a9
Compare
a52e94e
to
d454ea2
Compare
// Scenario V: A valid config envelope is passed | ||
require.NoError(t, cs.VerifyBlockSignature([]*protoutil.SignedData{}, testConfigEnvelope(t))) | ||
} | ||
// func TestLedgerResources_VerifyBlockSignature(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this commented out?
25cdcfd
to
4d5a104
Compare
@@ -158,19 +158,16 @@ Profiles:{{ range .Profiles }} | |||
PreferredMaxBytes: 512 KB | |||
{{- end}} | |||
Capabilities: | |||
{{- if eq $w.Consensus.Type "BFT" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you deleting this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why indeed?
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a quick review of the integration tests.
@@ -41,6 +41,7 @@ const ( | |||
PrivateDataPurgeBasePort | |||
RaftBasePort | |||
SBEBasePort | |||
SmartBFTBasePort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the SmartBFTBasePort different than the RaftBasePort? In general, that could be renamed the "ConsensusBasePort"?
|
||
doBody(client, req) | ||
|
||
Eventually(func() ChannelInfo { | ||
return ListOne(n, o, channel) | ||
}, n.EventuallyTimeout).Should(Equal(expectedChannelInfo)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change here?
It is unrelated to BFT, and I think it is wrong. We check the returned body for the correct response. ListOne is done always from the outside later in the tests.,
"github.com/hyperledger/fabric/common/channelconfig" | ||
"github.com/hyperledger/fabric/common/policies" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goimport
@@ -158,19 +158,16 @@ Profiles:{{ range .Profiles }} | |||
PreferredMaxBytes: 512 KB | |||
{{- end}} | |||
Capabilities: | |||
{{- if eq $w.Consensus.Type "BFT" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why indeed?
Status: "active", | ||
ConsensusRelation: "consenter", | ||
Height: 0, | ||
Height: 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, because Join
was changed incorrectly.
|
||
docker "github.com/fsouza/go-dockerclient" | ||
"github.com/hyperledger/fabric-config/configtx" | ||
"github.com/hyperledger/fabric-config/configtx/orderer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go import
|
||
for _, o := range network.Orderers { | ||
By("joining " + o.Name + " to channel as a consenter") | ||
channelparticipation.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join was changed incorrectly. Every usage of Join in the new tests should be revisited.
By("Waiting for followers to see the leader") | ||
Eventually(ordererRunners[1].Err(), network.EventuallyTimeout, time.Second).Should(gbytes.Say("Message from 1")) | ||
Eventually(ordererRunners[2].Err(), network.EventuallyTimeout, time.Second).Should(gbytes.Say("Message from 1")) | ||
Eventually(ordererRunners[3].Err(), network.EventuallyTimeout, time.Second).Should(gbytes.Say("Message from 1")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does that prove the existence of a leader?
who guarantees the leader is orderer 0?
see how it is done in Raft IT
By("Waiting for view change to occur") | ||
Eventually(ordererRunners[1].Err(), network.EventuallyTimeout*2, time.Second).Should(gbytes.Say("Changing to leader role, current view: 1, current leader: 2 channel=testchannel1")) | ||
Eventually(ordererRunners[2].Err(), network.EventuallyTimeout*2, time.Second).Should(gbytes.Say("Changing to follower role, current view: 1, current leader: 2 channel=testchannel1")) | ||
Eventually(ordererRunners[3].Err(), network.EventuallyTimeout*2, time.Second).Should(gbytes.Say("Changing to follower role, current view: 1, current leader: 2 channel=testchannel1")) | ||
Eventually(ordererRunners[4].Err(), network.EventuallyTimeout*2, time.Second).Should(gbytes.Say("Changing to follower role, current view: 1, current leader: 2 channel=testchannel1")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, how can you be sure who the leader will be?
URL: "/participation/v1/channels/" + channel, | ||
Status: "active", | ||
ConsensusRelation: "consenter", | ||
Height: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join was changed incorrectly. Revisit
} | ||
|
||
for _, consenter := range oc.Consenters() { | ||
fmt.Println(base64.StdEncoding.EncodeToString(consenter.ServerTlsCert)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from a debug session?
Type of change
Description
Add support for BFT consensus to orderer consensus plugin
Additional details
RFC: https://hyperledger.github.io/fabric-rfcs/text/006-bft-based-ordering-service.html
Related issues
EPIC task: #3771
Signed-off-by: Yacov Manevich yacovm@il.ibm.com
Signed-off-by: Yoav Tock tock@il.ibm.com
Signed-off-by: Parameswaran Selvam parselva@in.ibm.com