  The development of eHealth systems has brought great convenience to people's
life. Researchers have been combining new technologies to make eHealth systems
work better for patients. The Blockchain-based eHealth system becomes popular
because of its unique distributed tamper-resistant and privacy-preserving
features. However, due to the security issues of the blockchain system, there
are many security risks in eHealth systems utilizing the blockchain technology.
i.e. 51% attacks can destroy blockchain-based systems. Besides, trivial
transactions and frequent calls of smart contracts in the blockchain system
bring additional costs and security risks to blockchain-based eHealth systems.
Worse still, electronic medical records (EMRs) are controlled by medical
institutions rather than patients, which causes privacy leakage issues. In this
paper, we propose a medical data Sharing and Privacy-preserving eHealth system
based on blockChain technology (SPChain). We combine RepuCoin with the
SNARKs-based chameleon hash function to resist underlying blockchain attacks,
and design a new chain structure to make microblocks contribute to the weight
of blockchain. The system allows patients to share their EMRs among different
medical institutions in a privacy-preserving way. Besides, authorized medical
institutions can label wrong EMRs with the patients' permissions in the case of
misdiagnosis. Security analysis and performance evaluation demonstrate that the
proposed system can provide a strong security guarantee with a high efficiency.
