OpenAtomFoundation / xupercore

The kernel of xuperchain.
Apache License 2.0
61 stars 47 forks source link

consensus: delete the RegisterKernMethod panic in registry_imp & allo… #278

Closed aucusaga closed 2 years ago

aucusaga commented 2 years ago

Delete the RegisterKernMethod panic in registry_imp & allow consensus upgrade with the same name & add CheckConsensusVersion. Configuration should only store a version parameter when rolling back and should have an upper version parameter with other configs when updating a new consensus item.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

codecov-commenter commented 2 years ago

Codecov Report

Merging #278 (2f00ca8) into master (1bdfc06) will decrease coverage by 0.15%. The diff coverage is 34.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
- Coverage   46.61%   46.45%   -0.16%     
==========================================
  Files         136      136              
  Lines       12108    12143      +35     
==========================================
- Hits         5644     5641       -3     
- Misses       5297     5337      +40     
+ Partials     1167     1165       -2     
Impacted Files Coverage Δ
bcs/consensus/xpoa/common.go 85.71% <ø> (ø)
kernel/contract/manager/registry_impl.go 53.33% <0.00%> (-5.21%) :arrow_down:
kernel/consensus/pluggable_consensus.go 40.66% <30.90%> (-1.08%) :arrow_down:
bcs/consensus/xpoa/schedule.go 47.82% <40.00%> (-0.83%) :arrow_down:
bcs/consensus/xpoa/xpoa.go 55.26% <57.14%> (-0.66%) :arrow_down:
bcs/consensus/tdpos/tdpos.go 50.24% <100.00%> (+0.96%) :arrow_up:
bcs/consensus/tdpos/common.go 57.81% <0.00%> (-9.38%) :arrow_down:
bcs/consensus/tdpos/schedule.go 42.66% <0.00%> (-5.05%) :arrow_down:
kernel/consensus/base/driver/chained-bft/smr.go 42.13% <0.00%> (-0.80%) :arrow_down:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bdfc06...2f00ca8. Read the comment docs.