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

Never rollback initial ledger secrets #3169

Merged

Conversation

jumaffre
Copy link
Contributor

@jumaffre jumaffre commented Nov 5, 2021

When a backup node joins a service, it is given the entire history of ledger secrets so far (part of the /node/join response). If an election is triggered when the node is catching up, the node will rollback its store, which will cause the ledger secrets to be rolled back too. This is incorrect since the backup will need the ledger secrets to decrypt further entries, once the catch up phase is complete.

For example, if a new node joined without a snapshot and received the ledger secrets at seqnos {1, 10}, caught up till 5 at which point an election was triggered (new joiner's store is rolled back at 5, ledger secrets at now {1}), it wouldn't have been able to deserialise entries from 10 onwards.

We now protect the initial ledger secrets received in the /node/join response so that they cannot be rolled back.

@jumaffre jumaffre added the 1.x-todo PRs which should be backported to 1.x label Nov 5, 2021
@ccf-bot
Copy link
Collaborator

ccf-bot commented Nov 5, 2021

no_rollback_initial_ledger_secrets@36086 aka 20211105.23 vs main ewma over 20 builds from 35549 to 36072

Click to see table
build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem Historical query (/s)^ CHAMP put (/s)^ CHAMP get (/s)^
35549 20211102.2 6732.5 9.16235e+07 23931.7 1.92717e+07 4456.02 1.56017e+07 2697.14 1.29803e+07 2402.85 1.03588e+07 1738.9 1.11453e+07 9073.6 1.45931e+06 3.56174e+07
35552 20211102.3 6799.61 9.13613e+07 24293.7 1.76989e+07 4519.6 1.53396e+07 2723.21 1.29803e+07 2392.95 1.48153e+07 1805.06 8.78598e+06 9212.05 1.44991e+06 3.58042e+07
35695 20211102.27 6463 9.10992e+07 24195.1 1.7961e+07 4184.25 1.56017e+07 2652.46 1.32424e+07 2375.88 1.03588e+07 1785 8.78598e+06 7868.36 1.45207e+06 3.56788e+07
35713 20211102.32 6542.15 9.34585e+07 24352.3 1.7961e+07 4357.01 1.56017e+07 2701.35 1.37667e+07 2386.8 1.32424e+07 1799.66 8.52384e+06 8862.85 1.4564e+06 3.58663e+07
35738 20211102.39 6556.14 9.21478e+07 23645.3 1.76989e+07 4512.12 1.56017e+07 2654.88 1.40289e+07 2376.37 1.0621e+07 1792.54 8.52384e+06 8323.72 1.49064e+06 3.50685e+07
35796 20211103.2 6723.38 9.16235e+07 24021.4 1.7961e+07 4397.35 1.56017e+07 2682.78 1.11453e+07 2412.73 1.0621e+07 1784.19 8.78598e+06 8647.51 1.43799e+06 3.58669e+07
35857 20211104.2 6632.92 9.13613e+07 23631 1.7961e+07 4444.51 1.50774e+07 2683.82 1.45532e+07 2390.88 1.40289e+07 1806.14 8.78598e+06 8889.63 1.46631e+06 3.65056e+07
35860 20211104.3 6690.19 9.21478e+07 23988.5 1.7961e+07 4312.87 1.58639e+07 2739.33 1.2456e+07 2432.29 1.03588e+07 1753.15 9.04813e+06 8950.57 1.46452e+06 3.58042e+07
35888 20211104.10 6455.71 9.16235e+07 24071.1 1.7961e+07 4316.51 1.53396e+07 2718.11 1.08831e+07 2400.38 1.40289e+07 1646.06 9.04813e+06 7662.13 1.45796e+06 3.59292e+07
35913 20211104.17 6435.68 9.16235e+07 23668.7 1.7961e+07 4334.14 1.58639e+07 2735.92 1.40289e+07 2366.31 1.27181e+07 1774.94 9.04813e+06 8815.88 1.47507e+06 3.58669e+07
35925 20211104.20 6558.59 9.10992e+07 24085.4 1.7961e+07 4238.45 1.53396e+07 2651.63 1.0621e+07 2375.24 1.0621e+07 1770.33 8.78598e+06 7898.83 1.45455e+06 3.59298e+07
35941 20211104.24 6520.64 9.10992e+07 24184.2 1.76989e+07 4524.63 1.56017e+07 2753.06 1.4291e+07 2355.28 1.03588e+07 1804.45 8.78598e+06 8645.8 1.46358e+06 3.56794e+07
35970 20211104.32 6407.48 9.21478e+07 24078 1.7961e+07 4557.58 1.56017e+07 2671.96 1.2456e+07 2412.69 1.08831e+07 1805.56 8.78598e+06 9100.32 1.45247e+06 3.43624e+07
35983 20211104.36 6623.75 9.34585e+07 24153.7 1.7961e+07 4524.32 1.56017e+07 2561.82 1.0621e+07 2385.18 1.03588e+07 1781.03 8.78598e+06 8997.21 1.47773e+06 3.66362e+07
35993 20211104.39 6593.45 9.26721e+07 24179.2 1.76989e+07 4277.92 1.53396e+07 2724.66 1.0621e+07 2384.04 1.35046e+07 1815.6 9.04813e+06 7661.79 1.44194e+06 3.56168e+07
36000 20211104.41 6531.64 9.08371e+07 24395.1 1.7961e+07 4511.4 1.53396e+07 2727.53 1.45532e+07 2430.86 1.0621e+07 1822.44 8.78598e+06 8955.56 1.48783e+06 3.65714e+07
36015 20211105.2 6769.27 9.24099e+07 24388.2 1.82232e+07 4336.35 1.53396e+07 2688.14 1.11453e+07 2404.87 1.35046e+07 1810.07 9.04813e+06 8155.93 1.45588e+06 3.56794e+07
36023 20211105.5 6686.92 9.26721e+07 24291.3 1.7961e+07 4510.22 1.53396e+07 2752.03 1.32424e+07 2387.71 1.03588e+07 1812.27 9.04813e+06 9126.51 1.46557e+06 3.67019e+07
36055 20211105.15 6339.57 9.10992e+07 23449.6 1.7961e+07 4493.2 1.56017e+07 2641.13 1.0621e+07 2438.52 1.03588e+07 1821.64 8.52384e+06 8044.79 1.45175e+06 3.58036e+07
36072 20211105.20 6404.73 9.31964e+07 24182.4 1.7961e+07 4548.66 1.56017e+07 2730.08 1.11453e+07 2404.87 1.03588e+07 1819.8 8.78598e+06 9010.11 1.45723e+06 3.54933e+07

images

CHANGELOG.md Outdated Show resolved Hide resolved
@jumaffre jumaffre marked this pull request as ready for review November 5, 2021 13:47
@jumaffre jumaffre requested a review from a team as a code owner November 5, 2021 13:47
@jumaffre jumaffre enabled auto-merge (squash) November 5, 2021 14:02
@jumaffre jumaffre merged commit 2a52253 into microsoft:main Nov 5, 2021
jumaffre added a commit to jumaffre/CCF that referenced this pull request Nov 5, 2021
@achamayou achamayou removed the 1.x-todo PRs which should be backported to 1.x label Dec 2, 2021
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.

4 participants