Skip to content

Commit 3c5ea1f

Browse files
authored
Drop deprecated v3 adapters (#7553)
1 parent 9576b7b commit 3c5ea1f

8 files changed

Lines changed: 11 additions & 79 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717

1818
- Improved `ccf::historical::verify_self_issued_receipt` - now can verify receipts signed by the past service identities if they were back-endorsed (#7546).
1919

20+
### Removed
21+
22+
- `ccf::historical::adapter_v3` has been removed, `ccf::historical::read_only_adapter_v4` and `ccf::historical::read_write_adapter_v4` can be used instead (#7553).
23+
2024
## [7.0.0-dev6]
2125

2226
[7.0.0-dev6]: https://github.com/microsoft/CCF/releases/tag/ccf-7.0.0-dev6

doc/build_apps/api.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ Supporting Types
126126
Historical Queries
127127
------------------
128128

129-
.. doxygenfunction:: ccf::historical::adapter_v3
129+
.. doxygenfunction:: ccf::historical::read_only_adapter_v4
130+
:project: CCF
131+
132+
.. doxygenfunction:: ccf::historical::read_write_adapter_v4
130133
:project: CCF
131134

132135
.. doxygenclass:: ccf::historical::AbstractStateCache

doc/build_apps/example_cpp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ This app can then define its own endpoints from a blank slate. If it wants to pr
190190
Historical Queries
191191
~~~~~~~~~~~~~~~~~~
192192

193-
This sample demonstrates how to define a historical query endpoint with the help of :cpp:func:`ccf::historical::adapter_v3`.
193+
This sample demonstrates how to define a historical query endpoint with the help of :cpp:func:`ccf::historical::adapter_v4`.
194194
Most endpoints operate over the `current` state of the KV, but these historical queries operate over `old` state, specifically over the writes made by a previous transaction.
195195
The adapter handles extracting the target :term:`Transaction ID` from the user's request, and interacting with the :ref:`Historical Queries API <build_apps/api:Historical Queries>` to asynchronously fetch this entry from the ledger.
196196
The deserialised and verified transaction is then presented to the handler code below, which performs reads and constructs a response like any other handler.

include/ccf/app_interface.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5-
#include "ccf/ccf_deprecated.h"
65
#include "ccf/common_endpoint_registry.h"
76
#include "ccf/node_context.h"
87

include/ccf/historical_queries_adapter.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5-
#include "ccf/ccf_deprecated.h"
65
#include "ccf/endpoint_context.h"
76
#include "ccf/historical_queries_interface.h"
87
#include "ccf/node_context.h"
@@ -80,27 +79,6 @@ namespace ccf::historical
8079
ccf::SeqNo seqno,
8180
std::string& error_reason);
8281

83-
CCF_DEPRECATED("Replaced by _v4")
84-
ccf::endpoints::EndpointFunction adapter_v3(
85-
const HandleHistoricalQuery& f,
86-
ccf::AbstractNodeContext& node_context,
87-
const CheckHistoricalTxStatus& available,
88-
const TxIDExtractor& extractor = txid_from_header);
89-
90-
CCF_DEPRECATED("Replaced by _v4")
91-
ccf::endpoints::ReadOnlyEndpointFunction read_only_adapter_v3(
92-
const HandleReadOnlyHistoricalQuery& f,
93-
ccf::AbstractNodeContext& node_context,
94-
const CheckHistoricalTxStatus& available,
95-
const ReadOnlyTxIDExtractor& extractor = txid_from_header);
96-
97-
CCF_DEPRECATED("Replaced by _v4")
98-
ccf::endpoints::EndpointFunction read_write_adapter_v3(
99-
const HandleReadWriteHistoricalQuery& f,
100-
ccf::AbstractNodeContext& node_context,
101-
const CheckHistoricalTxStatus& available,
102-
const TxIDExtractor& extractor = txid_from_header);
103-
10482
ccf::endpoints::ReadOnlyEndpointFunction read_only_adapter_v4(
10583
const HandleReadOnlyHistoricalQuery& f,
10684
ccf::AbstractNodeContext& node_context,

include/ccf/node/quote.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5-
#include "ccf/ccf_deprecated.h"
65
#include "ccf/ds/quote_info.h"
76
#include "ccf/pal/attestation_sev_snp.h"
87
#include "ccf/pal/measurement.h"

scripts/headers-are-included.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ find src/ include/ -type f -print0 | xargs -0 grep -h "#include" | grep -E "incl
99

1010
pushd include/ || exit 1
1111
# version.h may have been generated, if cmake was run
12-
find ccf -type f -name "*.h" | grep -v "ccf/version.h" | sort -u > /tmp/CCF_HEADERS
12+
# ccf_deprecated.h may not be included if no APIs are currently deprecated
13+
find ccf -type f -name "*.h" | grep -v "ccf/version.h" | grep -v "ccf/ccf_deprecated.h" | sort -u > /tmp/CCF_HEADERS
1314
popd || exit 1
1415

1516
diff -y --suppress-common-lines /tmp/CCF_HEADERS /tmp/CCF_INCLUDED

src/node/historical_queries_adapter.cpp

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -406,58 +406,6 @@ namespace ccf::historical
406406
return HistoricalTxStatus::Valid;
407407
}
408408

409-
template <
410-
class TQueryHandler,
411-
class TEndpointFunction,
412-
class TEndpointContext,
413-
class TTxIDExtractor>
414-
TEndpointFunction _adapter_v3(
415-
const TQueryHandler& f,
416-
ccf::AbstractNodeContext& node_context,
417-
const CheckHistoricalTxStatus& available,
418-
const TTxIDExtractor& extractor)
419-
{
420-
return _adapter_v4<TQueryHandler, TEndpointFunction, TEndpointContext>(
421-
f, node_context, available, extractor, default_error_handler);
422-
}
423-
424-
ccf::endpoints::EndpointFunction adapter_v3(
425-
const HandleHistoricalQuery& f,
426-
ccf::AbstractNodeContext& node_context,
427-
const CheckHistoricalTxStatus& available,
428-
const TxIDExtractor& extractor)
429-
{
430-
return _adapter_v3<
431-
HandleHistoricalQuery,
432-
ccf::endpoints::EndpointFunction,
433-
ccf::endpoints::EndpointContext>(f, node_context, available, extractor);
434-
}
435-
436-
ccf::endpoints::ReadOnlyEndpointFunction read_only_adapter_v3(
437-
const HandleReadOnlyHistoricalQuery& f,
438-
ccf::AbstractNodeContext& node_context,
439-
const CheckHistoricalTxStatus& available,
440-
const ReadOnlyTxIDExtractor& extractor)
441-
{
442-
return _adapter_v3<
443-
HandleReadOnlyHistoricalQuery,
444-
ccf::endpoints::ReadOnlyEndpointFunction,
445-
ccf::endpoints::ReadOnlyEndpointContext>(
446-
f, node_context, available, extractor);
447-
}
448-
449-
ccf::endpoints::EndpointFunction read_write_adapter_v3(
450-
const HandleReadWriteHistoricalQuery& f,
451-
ccf::AbstractNodeContext& node_context,
452-
const CheckHistoricalTxStatus& available,
453-
const TxIDExtractor& extractor)
454-
{
455-
return _adapter_v3<
456-
HandleReadWriteHistoricalQuery,
457-
ccf::endpoints::EndpointFunction,
458-
ccf::endpoints::EndpointContext>(f, node_context, available, extractor);
459-
}
460-
461409
template <
462410
class TQueryHandler,
463411
class TEndpointFunction,

0 commit comments

Comments
 (0)