Skip to content

Module dev_poda.erl

A simple exemplar decentralized proof of authority consensus algorithm A simple exemplar decentralized proof of authority consensus algorithm for AO processes.

Description

This device is split into two flows, spanning three actions.

Execution flow: 1. Initialization. 2. Validation of incoming messages before execution. Commitment flow: 1. Adding commitments to results, either on a CU or MU.

Function Index

add_commitments/3*
commit_to_results/3*
execute/3
extract_opts/1*
find_process/2*Find the process that this message is targeting, in order to determine which commitments to add.
init/2
is_user_signed/1Determines if a user committed.
pfiltermap/2*Helper function for parallel execution of commitment gathering.
push/3Hook used by the MU pathway (currently) to add commitments to an outbound message if the computation requests it.
return_error/2*
validate/2*
validate_commitment/3*
validate_stage/3*
validate_stage/4*

Function Details

add_commitments/3 *

add_commitments(NewMsg, S, Opts) -> any()

commit_to_results/3 *

commit_to_results(Msg, S, Opts) -> any()

execute/3

execute(Outer, S, Opts) -> any()

extract_opts/1 *

extract_opts(Params) -> any()

find_process/2 *

find_process(Item, X2) -> any()

Find the process that this message is targeting, in order to determine which commitments to add.

init/2

init(S, Params) -> any()

is_user_signed/1

is_user_signed(Tx) -> any()

Determines if a user committed

pfiltermap/2 *

pfiltermap(Pred, List) -> any()

Helper function for parallel execution of commitment gathering.

push/3

push(Item, S, Opts) -> any()

Hook used by the MU pathway (currently) to add commitments to an outbound message if the computation requests it.

return_error/2 *

return_error(S, Reason) -> any()

validate/2 *

validate(Msg, Opts) -> any()

validate_commitment/3 *

validate_commitment(Msg, Comm, Opts) -> any()

validate_stage/3 *

validate_stage(X1, Msg, Opts) -> any()

validate_stage/4 *

validate_stage(X1, Tx, Content, Opts) -> any()