You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blockchain upgrade has many problems,such as historical data、API compatible with running nodes(you can't stop all nodes for upgrade)
One method of smooth upgrade:
1、client only storage business data(exclude block time、hash value from blockchain),use others database temporary storage historical data,write historical data to new version AnnChain
2、Use others database temporary storage historical data,write historical data to new version AnnChain. Temporary storage should include old version AnnChain information(block time and hash value from blockchain)and new version AnnChain information(block time and hash value from blockchain),one historical business data corresponds to two version AnnChain information,also use new version AnnChain information replace oldversion AnnChain information
The text was updated successfully, but these errors were encountered:
data strcuture incompatible:
(1)transaction type or block type changed ,added or deleted some fieled
(2)added or deleted some data type
may be have these problems when upgrading:
(1) load old data fail
(2) verifying fail ,verifing consensus and other requirements
(3) sync data , produced new block and some nodes are not upgrade yet
solution :
versioning ? change any data field upgrade version and remain old version code ?
after all nodes upgrating , node also can rewrite data with new version.
2.p2p communication protocol or data changed
p2p protocol or data changes , some node use old data structure and some use new data structure ,how to solve this ?
versioning , after a now upgreade , send old version data and swap it's version , then if another node upgrade ,they will communicate in new protocol or new version data
rpc api changes
versioning :
old version api process old data , new version api process new version data。
old : /api/...
new: /api/v2/...
Blockchain upgrade has many problems,such as historical data、API compatible with running nodes(you can't stop all nodes for upgrade)
One method of smooth upgrade:
1、client only storage business data(exclude block time、hash value from blockchain),use others database temporary storage historical data,write historical data to new version AnnChain
2、Use others database temporary storage historical data,write historical data to new version AnnChain. Temporary storage should include old version AnnChain information(block time and hash value from blockchain)and new version AnnChain information(block time and hash value from blockchain),one historical business data corresponds to two version AnnChain information,also use new version AnnChain information replace oldversion AnnChain information
The text was updated successfully, but these errors were encountered: