-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sbft: refactor + document future directions
Squashed commit of the following: commit ad540eeb38effe086851c6d9c58a0192e7034b10 Author: Simon Schubert <sis@zurich.ibm.com> Date: Tue Oct 4 15:09:38 2016 +0200 address golint concerns Change-Id: I59ae215d771a128cac740489a1d6308ebd1fb2a5 Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit d60d5f54bb5ca04e5857be13cd5dbfd3d67e5ac6 Author: Simon Schubert <sis@zurich.ibm.com> Date: Tue Oct 4 14:51:14 2016 +0200 add comments on backlog and state transfer strategy Change-Id: Iedc84f196c76e1cd12c88f2e74505cae64d80752 Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit 6169fd180918940e622a580a55d3be4243ccd919 Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 15:35:00 2016 +0200 properly process queued checkpoint messages Change-Id: If6d8e58f8a02178a4a435542162cba52b233df92 Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit 017c174700e0a47015a6dfc8967576cd8872de79 Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 15:33:57 2016 +0200 send hello message on connect Change-Id: Id76553a7403d730182ca5f8bd445053c28969f91 Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit b11ed71a695a96f103626d1db8629a39d39db7c4 Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 14:28:52 2016 +0200 rename message Seq to SeqView Change-Id: I2cb6b4082b72642342ca09eeb4c0be7eb382356d Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit 12b1d77eb8e7e0e4e8f1a68e04c5183ddf6a40c0 Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 14:24:22 2016 +0200 record signature origin in batch Change-Id: I9416e90ae01c35d548eeedb56ac6f345e9a0b63b Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit f18a7896183b94edd0ed1285fe2d8d827435e5bc Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 12:50:47 2016 +0200 change info to warning Change-Id: If25917123731484784deec45af589e84a17d9c26 Signed-off-by: Simon Schubert <sis@zurich.ibm.com> commit 59e79929ffb18f7fd834f9bf9bd667109f6c9e5d Author: Simon Schubert <sis@zurich.ibm.com> Date: Mon Oct 3 12:50:28 2016 +0200 conform to protobuf style guide Change-Id: I851476b6449c17c88f31539c78221fc81338cadd Signed-off-by: Simon Schubert <sis@zurich.ibm.com> Change-Id: Iaa289455d6ebc7c31a1e4130b9d07f8759d05c88 Signed-off-by: Simon Schubert <sis@zurich.ibm.com>
- Loading branch information
Showing
15 changed files
with
307 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright IBM Corp. 2016 All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package simplebft | ||
|
||
// Connection is an event from system to notify a new connection with | ||
// replica. | ||
// On connection, we send our latest (weak) checkpoint, and we expect | ||
// to receive one from replica. | ||
func (s *SBFT) Connection(replica uint64) { | ||
batch := *s.sys.LastBatch() | ||
batch.Payloads = nil // don't send the big payload | ||
s.sys.Send(&Msg{&Msg_Hello{&batch}}, replica) | ||
|
||
// TODO | ||
// | ||
// A reconnecting replica can play forward its blockchain to | ||
// the batch listed in the hello message. However, the | ||
// currently in-flight batch will not be reflected in the | ||
// Hello message, nor will all messages be present to actually | ||
// commit the in-flight batch at the reconnecting replica. | ||
// | ||
// Therefore we also send the most recent (pre)prepare, | ||
// commit, checkpoint so that the reconnecting replica can | ||
// catch up on the in-flight batch. | ||
} | ||
|
||
func (s *SBFT) handleHello(h *Batch, src uint64) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.