Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthdm/hbbft
/ functions
Functions
165 in github.com/anthdm/hbbft
⨍
Functions
165
◇
Types & classes
43
↓ 14 callers
Method
Messages
Messages returns the que of messages. The message que get's filled after processing a protocol message. After calling this method the que will be empt
bba.go:157
↓ 9 callers
Method
len
len return the current length of the buffer.
buffer.go:52
↓ 9 callers
Method
messages
()
message_que.go:53
↓ 8 callers
Function
NewRBC
NewRBC returns a new instance of the ReliableBroadcast configured with the given config
rbc.go:96
↓ 6 callers
Method
HandleMessage
HandleMessage will process the given rpc message. The caller is resposible to make sure only RPC messages are passed that are elligible for the BBA pr
bba.go:125
↓ 6 callers
Method
Hash
()
transaction.go:7
↓ 6 callers
Function
NewLocalTransport
NewLocalTransport returns a new LocalTransport.
local_transport.go:18
↓ 6 callers
Method
Output
Output will return the output of the ACS instance. If the output was not nil then it will return the output else nil. Note that after consuming the ou
acs.go:144
↓ 5 callers
Method
Consume
Consume returns a channel used for consuming and responding to RPC requests.
transport.go:16
↓ 5 callers
Method
InputValue
InputValue will set the given val as the initial value to be proposed in the Agreement and returns an initial AgreementMessage or an error.
bba.go:114
↓ 5 callers
Function
NewACS
NewACS returns a new ACS instance configured with the given Config and node ids.
acs.go:80
↓ 5 callers
Function
NewBBA
NewBBA returns a new instance of the Binary Byzantine Agreement.
bba.go:72
↓ 5 callers
Method
Output
Output will return the output of the bba instance. If the output was not nil then it will return the output else nil. Note that after consuming the ou
bba.go:145
↓ 5 callers
Method
addMessage
(msg *AgreementMessage)
bba.go:168
↓ 5 callers
Method
addMessage
(from uint64, msg interface{})
acs.go:320
↓ 4 callers
Method
AddTransaction
AddTransaction adds the given transaction to the internal buffer.
honey_badger.go:74
↓ 4 callers
Method
Done
Done returns true whether ACS has completed its agreements and cleared its messageQue.
acs.go:155
↓ 4 callers
Method
InputValue
InputValue sets the input value for broadcast and returns an initial set of Broadcast and ACS Messages to be broadcasted in the network.
acs.go:106
↓ 4 callers
Function
NewAgreementMessage
NewAgreementMessage constructs a new AgreementMessage.
bba.go:19
↓ 4 callers
Function
NewHoneyBadger
NewHoneyBadger returns a new HoneyBadger instance.
honey_badger.go:57
↓ 4 callers
Function
benchmark
(n, txsize, batchSize int)
bench/main.go:25
↓ 4 callers
Function
connectTransports
(tt []Transport)
rbc_test.go:237
↓ 4 callers
Method
handleAuxRequest
(senderID uint64, val bool)
bba.go:267
↓ 4 callers
Method
handleBvalRequest
handleBvalRequest processes the received binary value and fills up the message que if there are any messages that need to be broadcasted.
bba.go:238
↓ 4 callers
Function
newBuffer
newBuffer return a new initialized buffer with the max data cap set to 1024.
buffer.go:17
↓ 4 callers
Method
push
push pushes v to the buffer.
buffer.go:24
↓ 4 callers
Function
testAgreement
(t *testing.T, inputs []bool, expect bool)
bba_test.go:110
↓ 3 callers
Method
AcceptInput
AcceptInput returns true whether this bba instance is elligable for accepting a new input value.
bba.go:138
↓ 3 callers
Method
Messages
Messages returns the que of messages. The message que get's filled after processing a protocol message. After calling this method the que will be empt
rbc.go:207
↓ 3 callers
Function
excludeID
(ids []uint64, id uint64)
bba_test.go:168
↓ 3 callers
Method
makeRPC
(id, addr uint64, msg interface{})
local_transport.go:71
↓ 3 callers
Function
makeShards
makeShards will split the given value into equal sized shards along with somen additional parity shards.
rbc.go:404
↓ 3 callers
Method
processAgreement
(pid uint64, fun func(bba *BBA) error)
acs.go:253
↓ 3 callers
Method
run
run makes sure we only process 1 message at the same time, avoiding mutexes and race conditions.
bba.go:180
↓ 3 callers
Method
stop
()
bba.go:174
↓ 3 callers
Function
validateProof
validateProof will validate the given ProofRequest and hence return true or false accordingly.
rbc.go:393
↓ 2 callers
Method
Addr
Addr returns the address of the transport. We address transport by the id of the node.
transport.go:32
↓ 2 callers
Method
Connect
Connect is used to connect this tranport to another transport.
transport.go:28
↓ 2 callers
Method
Encode
(w io.Writer)
buffer_test.go:81
↓ 2 callers
Method
HandleMessage
HandleMessage handles incoming messages to ACS and redirects them to the appropriate sub(protocol) instance.
acs.go:118
↓ 2 callers
Method
Output
Output will return the output of the rbc instance. If the output was not nil then it will return the output else nil. Note that after consuming the ou
rbc.go:216
↓ 2 callers
Method
Outputs
Outputs returns the commited transactions per epoch.
honey_badger.go:114
↓ 2 callers
Method
SendMessage
(from, to uint64, msg interface{})
transport.go:25
↓ 2 callers
Method
Start
Start attempt to start the consensus engine. TODO(@anthdm): Reconsider API change.
honey_badger.go:104
↓ 2 callers
Method
Value
()
buffer_test.go:92
↓ 2 callers
Method
addMessages
(msgs []MessageTuple)
honey_badger.go:227
↓ 2 callers
Method
addTransactions
(txx ...*Transaction)
simulation/main.go:107
↓ 2 callers
Method
advanceEpoch
advanceEpoch will reset all the values that are bound to an epoch and increments the epoch value by 1.
bba.go:335
↓ 2 callers
Method
countEchos
countEchos count the number of echos with the given hash.
rbc.go:326
↓ 2 callers
Method
countReadys
countReadys count the number of readys with the given hash.
rbc.go:337
↓ 2 callers
Method
countTruthyAgreements
countTruthyAgreements returns the number of truthy received agreement messages.
acs.go:327
↓ 2 callers
Method
delete
@optimize: This can be much more efficient. delete removes the given slice of Transactions from the buffer.
buffer.go:32
↓ 2 callers
Method
handleEchoRequest
Every node that has received (N - f) echo's with the same root hash from distinct nodes knows that at least (f + 1) "good" nodes have sent an echo wit
rbc.go:253
↓ 2 callers
Method
handleMessage
handleMessage will process the given rpc message. The caller is resposible to make sure only RPC messages are passed that are elligible for the BBA pr
bba.go:208
↓ 2 callers
Method
handleProofRequest
When a node receives a Proof from a proposer it broadcasts the proof as an EchoRequest to the network after validating its content.
rbc.go:227
↓ 2 callers
Method
handleReadyRequest
If a node had received (2 * f + 1) ready's (with matching root hash) from distinct nodes, it knows that at least (f + 1) good nodes have sent it. Henc
rbc.go:280
↓ 2 callers
Method
inputValue
(data []byte)
rbc_test.go:208
↓ 2 callers
Function
makeRBCNodes
(n, pid int, resCh chan bcResult)
rbc_test.go:221
↓ 2 callers
Function
makeTransports
makeTransports is a test helper function for making n number of transports.
acs_test.go:132
↓ 2 callers
Function
makeids
(n int)
acs_test.go:123
↓ 2 callers
Function
newMessageQue
()
message_que.go:19
↓ 2 callers
Method
propose
propose will propose a new batch for the current epoch.
honey_badger.go:126
↓ 2 callers
Method
tryDecodeValue
tryDecodeValue will check whether the Value (V) can be decoded from the received shards. If the decode was successfull output will be set the this val
rbc.go:296
↓ 2 callers
Function
uint64sWithout
(s []uint64, val uint64)
acs.go:337
↓ 2 callers
Method
verifyTransaction
Simulate the delay of verifying a transaction.
simulation/main.go:102
↓ 1 callers
Method
Broadcast
Broadcast implements the Transport interface.
local_transport.go:44
↓ 1 callers
Method
Broadcast
Broadcast multicasts the given messages to all connected nodes.
transport.go:23
↓ 1 callers
Method
Decode
(r io.Reader)
buffer_test.go:88
↓ 1 callers
Method
Hash
()
buffer_test.go:73
↓ 1 callers
Method
InputValue
InputValue will set the given data as value V. The data will first splitted into shards and additional parity shards (used for reconstruction), the eq
rbc.go:129
↓ 1 callers
Method
SendProofMessages
SendProofMessages implements the Transport interface.
local_transport.go:32
↓ 1 callers
Method
SendProofMessages
SendProofMessages will equally spread the given messages under the participating nodes.
transport.go:20
↓ 1 callers
Method
commitLoop
()
simulation/main.go:137
↓ 1 callers
Function
connectTransports
(tt []hbbft.Transport)
simulation/main.go:190
↓ 1 callers
Method
countBvals
countBvals counts all the received Bval inputs matching b.
bba.go:360
↓ 1 callers
Method
countOutputs
countOutputs returns the number of received (aux) messages, the corresponding values that where also in our inputs.
bba.go:345
↓ 1 callers
Method
getOrNewACSInstance
(epoch uint64)
honey_badger.go:201
↓ 1 callers
Method
handleAgreement
handleAgreement processes the received AgreementMessage from sender (sid) for a value proposed by the proposing node (pid).
acs.go:217
↓ 1 callers
Method
handleBroadcast
handleBroadcast processes the received BroadcastMessage.
acs.go:224
↓ 1 callers
Method
handleMessage
(senderID uint64, msg *BroadcastMessage)
rbc.go:191
↓ 1 callers
Method
handleMessage
handleMessage handles incoming messages to ACS and redirects them to the appropriate sub(protocol) instance.
acs.go:130
↓ 1 callers
Method
hasSentBval
hasSentBval return true if we already sent out the given value.
bba.go:373
↓ 1 callers
Method
inputValue
inputValue will set the given val as the initial value to be proposed in the Agreement.
bba.go:195
↓ 1 callers
Method
inputValue
(data []byte)
rbc.go:173
↓ 1 callers
Method
inputValue
inputValue sets the input value for broadcast and returns an initial set of Broadcast and ACS Messages to be broadcasted in the network.
acs.go:167
↓ 1 callers
Method
len
()
message_que.go:47
↓ 1 callers
Function
makeACSNetwork
(n int)
acs_test.go:114
↓ 1 callers
Function
makeBBAInstances
(n int)
bba_test.go:178
↓ 1 callers
Function
makeBroadcastMessages
makeProofRequests will build a merkletree out of the given shards and make equal ProofRequest to send one proof to each participant in the consensus.
rbc.go:370
↓ 1 callers
Function
makeNetwork
(n int)
simulation/main.go:179
↓ 1 callers
Function
makeNodes
(n, ntx, txsize, batchSize int)
bench/main.go:68
↓ 1 callers
Function
makeProofRequests
makeProofRequests will build a merkletree out of the given shards and make equal ProofRequest to send one proof to each participant in the consensus.
rbc.go:349
↓ 1 callers
Function
makeTransactions
(n int)
simulation/main.go:225
↓ 1 callers
Function
makeids
(n int)
bench/main.go:85
↓ 1 callers
Function
makeids
(n int)
simulation/main.go:201
↓ 1 callers
Method
maybeProcessOutput
()
honey_badger.go:157
↓ 1 callers
Function
newServer
(id uint64, tr hbbft.Transport, nodes []uint64)
simulation/main.go:84
↓ 1 callers
Function
newTestNode
(hb *HoneyBadger, tr Transport)
honey_badger_test.go:31
↓ 1 callers
Function
newTestRBCEngine
(resCh chan bcResult, rbc *RBC, tr Transport)
rbc_test.go:172
↓ 1 callers
Function
newTransaction
()
simulation/main.go:214
next →
1–100 of 165, ranked by callers