Skip to main content
. 2025 Aug 21;25(16):5188. doi: 10.3390/s25165188
Algorithm 2 Blockchain layer algorithm for secure east–west communication
  • Require: East–west control packets RCt, controller set {C1,C2,,Cn}

  • Ensure: Verified block Bverified, access control decision Actrl

  •   1: for all controller Ci{C1,C2,,Cn} do

  •   2:     Collect trust communication packets rkt

  •   3:     Form control data block RCt={r1t,r2t,,rpt}

  •   4:     Compute hash Hblk=Hash(RCt  SKi)

  •   5:     Store Hblk for block verification

  •   6: end for

  •   7: PoA Validator Selection

  •   8: for all interested controller Ci do

  •   9:     Compute reputation score ρi and transaction history τi

  •   10:   Compute selection probability:

  •           Pauth(Ci)=ω1·ρi+ω2·τij=1q(ω1·ρj+ω2·τj)

  •   11: end for

  •   12: Select top-v validators based on Pauth(Ci)

  •   13: Consensus Voting

  •   14: for all validator Ck do

  •   15:    Verify transaction set T

  •   16:    Cast vote vk{0,1}

  •   17: end for

  •   18: Compute total approvals: Vyes=k=1vvk

  •   19: if Vyesθcons then

  •   20:    Compute commit hash Hcommit=H(T  Σv)

  •   21:    Form Bverified and append to blockchain

  •   22: else

  •   23:    Discard block and log failure

  •   24: end if

  •   25: IPFS Storage Integration

  •   26: Compute IPFS hash: HIPFS=Hash(RCt)IPFS

  •   27: Split RCt into chunks ΠkNIPFS

  •   28: DCi=k=1wΠk

  •   29: Store Πk on distributed IPFS nodes

  •   30: Data Retrieval and Integrity Check

  •   31: Controller sends retrieval request with HIPFS

  •   32: IPFS collects Πk, aggregates data and returns

  •   33: Controller computes verification hash: Hverify=Hashk=1wΠk

  •   34: if  Hverify=HIPFS  then

  •   35:     Send acknowledgment and continue

  •   36: else

  •   37:     Trigger arbitration process via smart contract

  •   38: end if

  •   39: Access Control via Signature Validation

  •   40: for all access requests by Ci or federated nodes do

  •   41:     Verify Sig(PKnode)

  •   42:     if Sig(PKnode) is valid then

  •   43:         Set Actrl1

  •   44:     else

  •   45:         Set Actrl0

  •   46:     end if

  •   47: end for