-1

我在实施崩溃共识算法时遇到问题。这是一些伪代码。有人可以给我解释一下它的含义。

Crash-Consensus-Receive-Message(m)
if m is proposal message then
    ▷add the received values to set of all known proposed values
    add[knownValues,values[m]]
    note that sender[m]has not crashed during this round
else                ▷ordinary message received
process message m

Crash-Consensus-Reach-Consensus()
knownValues←{ownValue}  ▷start with just own proposed value
sentValues←0            ▷no values sent yet
for i←0 to f do         ▷f+1 rounds of multicasts
      ▷determine which known values have not yet been sent
      newValues←knownValues -ssentValues
      multicast proposal message with newValues to alive processes
      wait until next round
use pre-agreed strategy with knownValues to get consensus value 

sender[m] 和 values[m] 是什么意思,因为 m 在这里表示消息?还有 knownValues 是什么意思。

4

1 回答 1

0

在大多数编程语言中,方括号表示一组值,在您的情况下是一组已知消息或一组要发送的消息。我不确定这在伪代码中是否也是如此,但我认为也许在所有情况下都可以帮助你。

于 2012-05-16T10:24:04.243 回答