Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth upgrade(incompatible version) #67

Open
needkane opened this issue Dec 19, 2019 · 1 comment
Open

Smooth upgrade(incompatible version) #67

needkane opened this issue Dec 19, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@needkane
Copy link
Member

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

@needkane needkane added the enhancement New feature or request label Dec 27, 2019
@metabd
Copy link

metabd commented Dec 30, 2019

incompatible upgrade problems:

  1. 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

  1. rpc api changes
    versioning :
    old version api process old data , new version api process new version data。
    old : /api/...
    new: /api/v2/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants