Research Article
ECLB: Edge-Computing-Based Lightweight Blockchain Framework for Mobile Systems
Algorithm 1
Candidate Tx block generation.
| | Input: | | | : The set of new transactions; | | | : Hash of previous block header; | | | : Timestamp; | | | : Secret key of the leader; | | | Output: | | | : Candidate block; | | (1) | Select a set of valid transactions from , denoted as ; | | (2) | Set ; | | (3) | Construct a Merkle hash tree over , and denote its root hash as ; | | (4) | Increase by , where represents the block height and sets zero in the genesis block; | | (5) | Compute a signature ; | | (6) | Set ; | | (7) | Set ; | | (8) | return ; |
|