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

Generalise handling of serialisation errors #577

Merged
merged 6 commits into from
Nov 21, 2019

Conversation

eddyashton
Copy link
Member

As discussed in #338, we currently have no way to safely recover from serialisation failures. This PR adds some more tests which will trigger serialisation failures, and ensures that they all produce a consistent response - currently aborting the executing node.

There are a few other recovery methods we could investigate here, in particular having the executing node rollback its KV, with an associated election to rollback consensus state. This may let the network recover with all nodes still alive, but needs some further thought. We hope to mitigate this risk in future with verified serialisers and increased enclave memory limits.

@eddyashton eddyashton requested a review from a team as a code owner November 21, 2019 13:32
@codecov-io
Copy link

codecov-io commented Nov 21, 2019

Codecov Report

Merging #577 into master will decrease coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #577      +/-   ##
==========================================
- Coverage   78.47%   78.31%   -0.16%     
==========================================
  Files         140      140              
  Lines       10678    10688      +10     
==========================================
- Hits         8379     8370       -9     
- Misses       2299     2318      +19
Flag Coverage Δ
#e2e_BFT 50.66% <75%> (-0.1%) ⬇️
#e2e_CFT 73.5% <75%> (+0.25%) ⬆️
#unit_BFT 64.82% <89.29%> (+0.08%) ⬆️
#unit_CFT 71.97% <89.29%> (+0.03%) ⬆️
Impacted Files Coverage Δ
src/kv/genericserialisewrapper.h 89.8% <ø> (-0.14%) ⬇️
src/kv/kv.h 87.84% <100%> (+0.17%) ⬆️
src/kv/kvtypes.h 63.64% <100%> (+3.64%) ⬆️
src/consensus/pbft/libbyz/Certificate.h 46.67% <0%> (-7.33%) ⬇️
src/consensus/raft/raft.h 82.59% <0%> (-1.27%) ⬇️
src/host/tcp.h 74.04% <0%> (ø) ⬆️

@ghost
Copy link

ghost commented Nov 21, 2019

images

tests/e2e_batched.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Nov 21, 2019

images

@eddyashton eddyashton merged commit df0abbf into microsoft:master Nov 21, 2019
@eddyashton eddyashton deleted the large_write_sets branch November 21, 2019 17:24
eddyashton added a commit to eddyashton/CCF that referenced this pull request Mar 24, 2020
* Add params to batched app

* Add test of exceptional serialisation failure

* Catch exceptions and commit

* Abort hope, all ye who fail to serialise

* Add disabled run_to_destruction test

* Decomment test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants