Blockchain, with its immutability and decentralization, drives innovation in finance and supply chain, but the growing data volume makes storing complete ledger replicas impractical for users, especially in the resource-constrained Internet of Thing (IoT) scenarios. Existing solutions focus on nodes storing only a partial ledger to alleviate storage burdens. Nonetheless, these approaches prioritize storage optimization by minimizing the query cost and lack control over storage cost. Furthermore, these approaches overlook the relationships between network users, thus failing to fully measure the future query cost. Thus, this article proposes BSSN, a blockchain storage technology based on social networks. The combined use of storage cost and query cost is introduced for the first time to formulate the node allocation optimization (NAO) problem, and the multipopulation genetic ant colony (MGAC) algorithm will be employed to derive node allocation strategies. Specifically, we address three technical challenges: 1) to predict the transactions that nodes will participate in the future, we employ the social ties to obtain the access frequencies among users; 2) to strike a balance between the storage cost and query cost, we jointly model the two costs as a multiobjective optimization problem to formulate the NAO problem; and 3) to solve the NP-hard NAO problem, we use the MGAC algorithm, where the storage and query populations collaboratively search for solutions based on four operations. Extensive experiments indicate that compared with existing work, BSSN can reduce the average query cost to 67% with its adjustable storage cost, ensuring a balanced data storage among users.