The invention discloses a block chain-based
data synchronization method and device, and an electronic device, and relates to the technical field of block chains, the
data synchronization method comprises the following steps: obtaining historical total data of a host
system and a plurality of current incremental
transaction data, and adopting a preset storage strategy to store a plurality of incremental
transaction data; storing the historical total data and all incremental
transaction data to a block chain; a preset
verification strategy is adopted to verify each incremental transaction data to obtain a
verification result, and the preset
verification strategy is constructed based on the
smart contract and the two-stage submission protocol; and when the verification result indicates that any distributed node fails to execute the local transaction, triggering a
rollback instruction to control all the distributed nodes and the host
system to roll back the local transaction so as to
complete data synchronization. According to the method and the device, the technical problem of relatively low
data synchronization accuracy in a scene of mixed data of a host and a distributed architecture in related technologies is solved.