microsoft / CCF

Confidential Consortium Framework
https://microsoft.github.io/CCF/
Apache License 2.0
764 stars 205 forks source link

replicated and derived tables with separate serializers #553

Closed olgavrou closed 4 years ago

olgavrou commented 4 years ago

Regarding issue #539 addressing action points 1 and 2. Regarding issue #562 addressing two middle check points (runtime consensus switch, passing switch to enclave/nodestate)

codecov-io commented 4 years ago

Codecov Report

Merging #553 into master will decrease coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #553      +/-   ##
==========================================
- Coverage   78.56%   78.54%   -0.02%     
==========================================
  Files         140      140              
  Lines       10508    10558      +50     
==========================================
+ Hits         8255     8292      +37     
- Misses       2253     2266      +13
Flag Coverage Δ
#e2e_BFT 50.9% <88.57%> (+0.12%) :arrow_up:
#e2e_CFT 73.4% <88.57%> (-0.07%) :arrow_down:
#unit_BFT ?
#unit_CFT 72.84% <95.83%> (-0.09%) :arrow_down:
Impacted Files Coverage Δ
src/node/networktables.h 100% <ø> (ø) :arrow_up:
src/kv/genericserialisewrapper.h 89.93% <ø> (ø) :arrow_up:
src/enclave/enclave.h 98.99% <100%> (ø) :arrow_up:
src/host/main.cpp 98.32% <100%> (+0.08%) :arrow_up:
src/kv/kvtypes.h 60% <100%> (+7.06%) :arrow_up:
src/node/history.h 55.35% <100%> (ø) :arrow_up:
src/enclave/ccf_v.h 74.36% <100%> (+0.67%) :arrow_up:
src/kv/kv.h 87.67% <100%> (+0.51%) :arrow_up:
src/node/networkstate.h 100% <100%> (ø) :arrow_up:
src/host/enclave.h 52.05% <100%> (+0.67%) :arrow_up:
... and 3 more
cimetrics commented 4 years ago

images

cimetrics commented 4 years ago

images

olgavrou commented 4 years ago

As discussed with @achamayou and @ashamis, the PR will be updated so that the derived write set is also passed through to replicate(). That way when we do catchup in PBFT, or when we are replaying the ledger, we don't need to execute the requests.

cimetrics commented 4 years ago

images

cimetrics commented 4 years ago

images

cimetrics commented 4 years ago

images

cimetrics commented 4 years ago

images

achamayou commented 4 years ago

@olgavrou not sure if I'm reading too much into that, but it looks like the last few cimetrics agree on a fairly consistent -5% on KV serialise. It's not enough that I'm worried about it, but it may be interesting to do some local kv_bench runs to check if that's accurate or not.

olgavrou commented 4 years ago

@achamayou regarding the metrics running the bench mark for some time (master vs my PR) I get the below results (roughly):

image

cimetrics commented 4 years ago

images

achamayou commented 4 years ago

@olgavrou thanks for checking, that looks like it’s within noise range.

cimetrics commented 4 years ago

images

cimetrics commented 4 years ago

images