From a75a2c6f00ffef21a12103d9131b266a262e2a91 Mon Sep 17 00:00:00 2001 From: Sergio Mena Date: Tue, 21 Dec 2021 12:43:04 +0100 Subject: [PATCH] Fixed bug in grammar --- spec/abci++/abci++_tmint_expected_behavior_002_draft.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/abci++/abci++_tmint_expected_behavior_002_draft.md b/spec/abci++/abci++_tmint_expected_behavior_002_draft.md index a36580f05..2b011e16b 100644 --- a/spec/abci++/abci++_tmint_expected_behavior_002_draft.md +++ b/spec/abci++/abci++_tmint_expected_behavior_002_draft.md @@ -41,8 +41,9 @@ from the point of view of the Application. start = clean-start / recovery clean-start = init-chain [state-sync] *consensus-height -state-sync = 1*state-sync-attempt info +state-sync = *state-sync-attempt success-sync info state-sync-attempt = offer-snapshot *apply-chunk +success-sync = offer-snapshot 1*apply-chunk recovery = info *consensus-replay *consensus-height consensus-replay = decide @@ -113,12 +114,14 @@ Let us now examine the grammar line by line, providing further details. * In _state-sync_ mode, Tendermint makes one or more attempts at synchronizing the Application's state. At the beginning of each attempt, it offers the Application a snapshot found at another process. If the Application accepts the snapshop, at sequence of calls to `ApplySnapshotChunk` method follow - to provide the Application with all the snapshots needed, in order, to reconstruct the state locally. + to provide the Application with all the snapshots needed, in order to reconstruct the state locally. + A successful attempt must provide at least one chunk via `ApplySnapshotChunk`. At the end of a successful attempt, Tendermint calls `Info` to make sure the recontructed state's _AppHash_ matches the one in the block header at the corresponding height. >```abnf ->state-sync = 1*state-sync-attempt info +>state-sync = *state-sync-attempt success-sync info >state-sync-attempt = offer-snapshot *apply-chunk +>success-sync = offer-snapshot 1*apply-chunk >``` * In recovery mode, Tendermint first calls `Info` to know from which height it needs to replay decisions