Mobile network operators can expand their capacity by aggregating their licensed spectrum with the spectrum discovered opportunistically, i.e., spatiotemporally unused spectrum by other primary users. For an accurate identification of the spectral opportunities, the mobile network has to deploy multiple sensors or it can offload this task to nearby nodes with sensing capabilities, so called helpers. Unfortunately, incentives are limited for helpers to perform energy-wasteful spectrum sensing. Instead, we envision spectrum sensing as a service (Spass) in which a smart contract running on a blockchain (BC) describes the required sensing service parameters and the contracted helpers receive payments only if they perform sensing accurately as agreed in the contract.
In this repository you find the source code for the running prototype of Spass on Ethereum BC.
The full paper describing all details of the proposed spectrum sensing as a service can be found here: full paper
We implemented a proof-of-concept contract for Spass which contains the most important functionality.
You can test our contract using Remix IDE. Go to RemixIDE and upload our code file Spass.sol.
To understand the usage of the contract consider the following simple scenario with the contract owner (SU) and a single helper node (H). Here the SU deploys and initializes the contract whereas the helper registers and reports its sensing results. Afterwards the SU performs clearing so that the SU is able to withdraw its funds.
For this example the following accounts are used:
Owner SU: 0xca35b7d915458ef540ade6068dfe2f44e8fa733c
Helper H: 0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db
Here are the minimal steps:
In Remix-IDE select the SU account and click on deploy.
Call the function init() from SU account with the following arguments:
_sens_f: 8, _round_s: 800, _cp_f: 800, _max_p_f: 1, _min_p_d: 999
Call function increaseFunds() from SU account. Set a large enough value of ETH (in Remix IDE it can be set below the Gas limit), e.g. 1 ETH
Call function registerSensingHelper() from H account with the following arguments:
_sHelper: 0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db, _id: 1, _priceSenseBit: 1000000, _p_f: 1, _p_d: 999
Call function waitForOtherHelpers() from H account. Function returns , i.e. enough helpers.
Call function reportSensingData() from H account using the following arguments:
_sHelper: 0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db, _id: 1, _seq: 1, _data: [1,2]
Call function clearing() from SU account using the following arguments:
_seq: 1
Call function withdraw() from account H. Note: the account of H should increase afterwards by 6.4 gwei (=0.0000000064 ETH).
Just use the following bibtex:
@inproceedings{bayhan_spass_dyspan18,
author = {Bayhan, Suzan and Zubow, Anatolij and Wolisz, Adam},
title = {{Spass: Spectrum Sensing as a Service via Smart Contracts}},
booktitle = {IEEE International Symposium on Dynamic Spectrum Access Networks (DYSPAN)},
location = {Seoul, South Korea},
year = {2018}
}