Research Article

A Partitioned DAG Distributed Ledger with Local Consistency for Vehicular Reputation Management

Algorithm 1

Consensus algorithm for transactions on partitions.
input: A tip ,local consistency threshold current tip set , sub-DAG consisted of the confirmed transactions and sub- DAG consisted of the unconfirmed transactions
output: Updated ledger and the updated tip set
1 Extract all approval transactions packaged in ;
2 for each do
3 calculate and add weight to
4 add to Cumulative Weight of
  ;
5 if to
6  add to to
7  move fromto
8 else
9  wait for a punish time;
10  add to
11. Extract the transaction that indirectly approved by
12 for each in do
13 add to of ;
14 if then
15  move to
16 final;
17 return;