CCF
Loading...
Searching...
No Matches
historical_queries_utils.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
7#include "ccf/rpc_context.h"
8#include "ccf/tx.h"
9
10namespace ccf::historical
11{
12 // Modifies the receipt stored in state to include historical service
13 // endorsements, where required. If the state talks about a different service
14 // identity, which is known to be a predecessor of this service (via disaster
15 // recoveries), then an endorsement of the receipt's node certificate will be
16 // created. This may need to use the state_cache to request additional
17 // historical entries to construct this endorsement, and may read from the
18 // current/latest state via tx. Returns true if the operation is complete,
19 // though it may still have failed to produce an endorsement. Returns false if
20 // additional entries have been requested, in which case the caller should
21 // retry later.
25 AbstractStateCache& state_cache,
26 std::shared_ptr<NetworkIdentitySubsystemInterface>
27 network_identity_subsystem);
28
29 // Modifies the receipt stored in state to include historical service
30 // endorsements, where required. If the state talks about a different service
31 // identity, which is known to be a predecessor of this service (via disaster
32 // recoveries), then an endorsement chain of all service identities preceding
33 // the current one will be created. This may need to use the state_cache to
34 // request additional historical entries to construct this endorsement, and
35 // may read from the current/latest state via tx. Returns true if the
36 // operation is complete, though it may still have failed to produce an
37 // endorsement. Returns false if additional entries have been requested, in
38 // which case the caller should retry later.
42 AbstractStateCache& state_cache);
43}
Definition tx.h:160
Definition historical_queries_adapter.h:18
std::shared_ptr< State > StatePtr
Definition historical_queries_interface.h:41
bool populate_service_endorsements(ccf::kv::ReadOnlyTx &tx, ccf::historical::StatePtr &state, AbstractStateCache &state_cache, std::shared_ptr< NetworkIdentitySubsystemInterface > network_identity_subsystem)
Definition historical_queries_utils.cpp:279
bool populate_cose_service_endorsements(ccf::kv::ReadOnlyTx &tx, ccf::historical::StatePtr &state, AbstractStateCache &state_cache)
Definition historical_queries_utils.cpp:367