  As an emerging decentralized secure data management platform, blockchain has
gained much popularity recently. To maintain a canonical state of blockchain
data record, proof-of-work based consensus protocols provide the nodes,
referred to as miners, in the network with incentives for confirming new block
of transactions through a process of "block mining" by solving a cryptographic
puzzle. Under the circumstance of limited local computing resources, e.g.,
mobile devices, it is natural for rational miners, i.e., consensus nodes, to
offload computational tasks for proof of work to the cloud/fog computing
servers. Therefore, we focus on the trading between the cloud/fog computing
service provider and miners, and propose an auction-based market model for
efficient computing resource allocation. In particular, we consider a
proof-of-work based blockchain network. Due to the competition among miners in
the blockchain network, the allocative externalities are particularly taken
into account when designing the auction mechanisms. Specifically, we consider
two bidding schemes: the constant-demand scheme where each miner bids for a
fixed quantity of resources, and the multi-demand scheme where the miners can
submit their preferable demands and bids. For the constant-demand bidding
scheme, we propose an auction mechanism that achieves optimal social welfare.
In the multi-demand bidding scheme, the social welfare maximization problem is
NP-hard. Therefore, we design an approximate algorithm which guarantees the
truthfulness, individual rationality and computational efficiency. Through
extensive simulations, we show that our proposed auction mechanisms with the
two bidding schemes can efficiently maximize the social welfare of the
blockchain network and provide effective strategies for the cloud/fog computing
service provider.
