chainx-org / ChainX

Bitcoin's layer2 smart contract network has already supported WASM and EVM, and is supporting MoveVM
https://chainx.org
GNU General Public License v3.0
323 stars 121 forks source link

Fix sync #679

Closed icodezjb closed 1 year ago

icodezjb commented 1 year ago

This PR solves the remaining block synchronization problem in this issue:Debug: panicked at 'Storage root must match that calculated '

As stated in this post, the root-cause is the mismatch between the native and Wasm runtimes.

The solution is to replace the wasm on the chain with the correct wasm during the blocks syncing.

Some block ranges use the correct wasm instead when synchronizing blocks.

[(881910,881957),(882041,882132),(882175,882314),(882359,882536),(882585,882802),(882937,882984),(883078,883169),(883260,883353),(883443,883489),(883536,883625),(883716,883807),(883855,883898),(883945,884037),(884079,884128),(884172,884442),(884582,884717)]