Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Bftsmart
提交
8551cb7e
B
Bftsmart
项目概览
JDChain
/
Bftsmart
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Bftsmart
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8551cb7e
编写于
1月 22, 2019
作者:
J
João Sousa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed bug in the state transfer caused by the addition of an ACK field in the requests
上级
d387bdbe
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
23 addition
and
12 deletion
+23
-12
bin/BFT-SMaRt.jar
bin/BFT-SMaRt.jar
+0
-0
config/system.config
config/system.config
+1
-1
src/bftsmart/consensus/roles/Acceptor.java
src/bftsmart/consensus/roles/Acceptor.java
+1
-1
src/bftsmart/tom/MessageContext.java
src/bftsmart/tom/MessageContext.java
+12
-1
src/bftsmart/tom/ServiceReplica.java
src/bftsmart/tom/ServiceReplica.java
+2
-2
src/bftsmart/tom/core/DeliveryThread.java
src/bftsmart/tom/core/DeliveryThread.java
+1
-1
src/bftsmart/tom/leaderchange/LCManager.java
src/bftsmart/tom/leaderchange/LCManager.java
+0
-1
src/bftsmart/tom/server/defaultservices/CommandsInfo.java
src/bftsmart/tom/server/defaultservices/CommandsInfo.java
+6
-5
未找到文件。
bin/BFT-SMaRt.jar
浏览文件 @
8551cb7e
无法预览此类型文件
config/system.config
浏览文件 @
8551cb7e
...
...
@@ -120,7 +120,7 @@ system.totalordermulticast.invoketimeout = 40000
############################################
#Enable/disable control flow mechanism
system
.
controlflow
.
controlflow
=
tru
e
system
.
controlflow
.
controlflow
=
fals
e
#Maximum number of total pending requests that each replica can hold. Set to -1 to disable.
system
.
controlflow
.
maxpendingreqs
=
500000
...
...
src/bftsmart/consensus/roles/Acceptor.java
浏览文件 @
8551cb7e
...
...
@@ -194,7 +194,7 @@ public final class Acceptor {
tomLayer
.
setInExec
(
cid
);
}
epoch
.
deserializedPropValue
=
tomLayer
.
checkProposedValue
(
value
,
true
);
if
(
epoch
.
deserializedPropValue
!=
null
&&
!
epoch
.
isWriteSent
())
{
if
(
epoch
.
getConsensus
().
getDecision
().
firstMessageProposed
==
null
)
{
epoch
.
getConsensus
().
getDecision
().
firstMessageProposed
=
epoch
.
deserializedPropValue
[
0
];
...
...
src/bftsmart/tom/MessageContext.java
浏览文件 @
8551cb7e
...
...
@@ -41,6 +41,7 @@ public class MessageContext implements Serializable {
private
final
int
sequence
;
private
final
int
operationId
;
private
final
int
replyServer
;
private
final
int
ackSeq
;
private
final
byte
[]
signature
;
// Consensus info
...
...
@@ -70,6 +71,7 @@ public class MessageContext implements Serializable {
* @param sequence Request's sequence number
* @param operationId The operation ID
* @param replyServer ID of the server expected to send a non-hashed reply when the clients sends an unordered hashed request.
* @param ackSeq ACK sequence for the request
* @param signature Client's signature.
* @param timestamp The timestamp as generated by the leader
* @param numOfNonces The nonces as generated by the leader
...
...
@@ -82,7 +84,7 @@ public class MessageContext implements Serializable {
* @param noOp true if the consensus instance has no operations to deliver to the application
*/
public
MessageContext
(
int
sender
,
int
viewID
,
TOMMessageType
type
,
int
session
,
int
sequence
,
int
operationId
,
int
replyServer
,
byte
[]
signature
,
int
session
,
int
sequence
,
int
operationId
,
int
replyServer
,
int
ackSeq
,
byte
[]
signature
,
long
timestamp
,
int
numOfNonces
,
long
seed
,
int
regency
,
int
leader
,
int
consensusId
,
Set
<
ConsensusMessage
>
proof
,
TOMMessage
firstInBatch
,
boolean
noOp
)
{
...
...
@@ -95,6 +97,7 @@ public class MessageContext implements Serializable {
this
.
sequence
=
sequence
;
this
.
operationId
=
operationId
;
this
.
replyServer
=
replyServer
;
this
.
ackSeq
=
ackSeq
;
this
.
signature
=
signature
;
this
.
timestamp
=
timestamp
;
...
...
@@ -157,6 +160,13 @@ public class MessageContext implements Serializable {
return
replyServer
;
}
/**
* Returns the ACK sequence for the request.
* @return ACK sequence for the request.
*/
public
int
getAckSeq
()
{
return
ackSeq
;
}
/**
* Returns the client's signature.
...
...
@@ -295,6 +305,7 @@ public class MessageContext implements Serializable {
TOMMessage
ret
=
new
TOMMessage
(
sender
,
session
,
sequence
,
operationId
,
content
,
viewID
,
type
);
ret
.
setReplyServer
(
replyServer
);
ret
.
setAckSeq
(
ackSeq
);
ret
.
serializedMessageSignature
=
signature
;
ret
.
serializedMessage
=
TOMMessage
.
messageToBytes
(
ret
);
...
...
src/bftsmart/tom/ServiceReplica.java
浏览文件 @
8551cb7e
...
...
@@ -301,7 +301,7 @@ public class ServiceReplica {
numRequests
++;
MessageContext
msgCtx
=
new
MessageContext
(
request
.
getSender
(),
request
.
getViewID
(),
request
.
getReqType
(),
request
.
getSession
(),
request
.
getSequence
(),
request
.
getOperationId
(),
request
.
getReplyServer
(),
request
.
serializedMessageSignature
,
firstRequest
.
timestamp
,
request
.
getReplyServer
(),
request
.
getAckSeq
(),
request
.
serializedMessageSignature
,
firstRequest
.
timestamp
,
request
.
numOfNonces
,
request
.
seed
,
regencies
[
consensusCount
],
leaders
[
consensusCount
],
consId
[
consensusCount
],
cDecs
[
consensusCount
].
getConsMessages
(),
firstRequest
,
false
);
if
(
requestCount
+
1
==
requestsFromConsensus
.
length
)
{
...
...
@@ -384,7 +384,7 @@ public class ServiceReplica {
msgCtx
[
line
]
=
new
MessageContext
(
m
.
getSender
(),
m
.
getViewID
(),
m
.
getReqType
(),
m
.
getSession
(),
m
.
getSequence
(),
m
.
getOperationId
(),
m
.
getReplyServer
(),
m
.
serializedMessageSignature
,
firstRequest
.
timestamp
,
m
.
getReplyServer
(),
m
.
getAckSeq
(),
m
.
serializedMessageSignature
,
firstRequest
.
timestamp
,
m
.
numOfNonces
,
m
.
seed
,
regencies
[
consensusCount
],
leaders
[
consensusCount
],
consId
[
consensusCount
],
cDecs
[
consensusCount
].
getConsMessages
(),
firstRequest
,
true
);
msgCtx
[
line
].
setLastInBatch
();
...
...
src/bftsmart/tom/core/DeliveryThread.java
浏览文件 @
8551cb7e
...
...
@@ -319,7 +319,7 @@ public final class DeliveryThread extends Thread {
protected
void
deliverUnordered
(
TOMMessage
request
,
int
regency
)
{
MessageContext
msgCtx
=
new
MessageContext
(
request
.
getSender
(),
request
.
getViewID
(),
request
.
getReqType
(),
request
.
getSession
(),
request
.
getSequence
(),
request
.
getOperationId
(),
request
.
getReplyServer
(),
request
.
serializedMessageSignature
,
request
.
getSession
(),
request
.
getSequence
(),
request
.
getOperationId
(),
request
.
getReplyServer
(),
request
.
getAckSeq
(),
request
.
serializedMessageSignature
,
System
.
currentTimeMillis
(),
0
,
0
,
regency
,
-
1
,
-
1
,
null
,
null
,
false
);
// Since the request is unordered,
// there is no consensus info to pass
...
...
src/bftsmart/tom/leaderchange/LCManager.java
浏览文件 @
8551cb7e
...
...
@@ -15,7 +15,6 @@ limitations under the License.
*/
package
bftsmart.tom.leaderchange
;
import
bftsmart.communication.server.ServerConnection
;
import
java.io.IOException
;
import
java.security.MessageDigest
;
import
java.security.SignedObject
;
...
...
src/bftsmart/tom/server/defaultservices/CommandsInfo.java
浏览文件 @
8551cb7e
...
...
@@ -47,11 +47,12 @@ public class CommandsInfo implements Serializable {
msgCtx
[
i
].
getViewID
(),
msgCtx
[
i
].
getType
(),
msgCtx
[
i
].
getSession
(),
msgCtx
[
i
].
getSequence
(),
msgCtx
[
i
].
getOperationId
(),
msgCtx
[
i
].
getReplyServer
(),
msgCtx
[
i
].
getSignature
(),
msgCtx
[
i
].
getTimestamp
(),
msgCtx
[
i
].
getNumOfNonces
(),
msgCtx
[
i
].
getSeed
(),
msgCtx
[
i
].
getRegency
(),
msgCtx
[
i
].
getLeader
(),
msgCtx
[
i
].
getConsensusId
(),
msgCtx
[
i
].
getProof
(),
msgCtx
[
i
].
getFirstInBatch
(),
msgCtx
[
i
].
isNoOp
());
msgCtx
[
i
].
getAckSeq
(),
msgCtx
[
i
].
getSignature
(),
msgCtx
[
i
].
getTimestamp
(),
msgCtx
[
i
].
getNumOfNonces
(),
msgCtx
[
i
].
getSeed
(),
msgCtx
[
i
].
getRegency
(),
msgCtx
[
i
].
getLeader
(),
msgCtx
[
i
].
getConsensusId
(),
msgCtx
[
i
].
getProof
(),
msgCtx
[
i
].
getFirstInBatch
(),
msgCtx
[
i
].
isNoOp
());
onlyNeeded
[
i
]
=
msg
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录