Research Article

Towards Trustworthy IoT: A Blockchain-Edge Computing Hybrid System with Proof-of-Contribution Mechanism

Algorithm 1

creEvaluation() ABI.
Input: address, type, timestamp, hash
Output: result (update, reward)
 Require: result.update ← False, result.reward ← False.
 Create a timestamp array timestampArray[].
 timestampArray ← timQuery (address)
 get Cs (address, timestampArray) using (2)
 create an Entry Contract instance entry
if entry.accControl(address, Cs) is captured then
  result.update ← True
end if
while true do
  check the transaction receipt
  if the block containing the behavior is generated then
  get Ps(Cs) using (5)
  create a transaction(address, Ps)
  launch the transaction.
  result.reward ← True
  break.
   end if
end while
return result (update, reward)