Skip to content

Commit

Permalink
Merge branch 'main' into rename_ccfapp_to_ccf
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Jun 28, 2024
2 parents 77b99c1 + 45328bf commit b504a82
Show file tree
Hide file tree
Showing 183 changed files with 2,132 additions and 1,988 deletions.
2 changes: 1 addition & 1 deletion .daily_canary
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
( V ) / . \ | +---=---'
/--x-m- /--n-n---xXx--/--yY------>>>----<<<>>]]{{}}---||-/\---..
2024__
!..!
!..!!
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
set -ex
cd build
source env/bin/activate && ctest -VV --timeout 240 -L partitions -C partitions
./tests.sh --timeout 240 --output-on-failure -L partitions -C partitions
shell: bash
if: "${{ matrix.platform.name != 'snp' }}" # Needs 1ES Pool support

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `::http` is now `ccf::http`
- `::nonstd` is now `ccf::nonstd`
- `::crypto` is now `ccf::crypto`
- `::kv` is now `ccf::kv`
- `::logger` is now `ccf::logger`
- `::ccfapp` is now `::ccf`
- The `programmability` sample app now demonstrates how applications can define their own extensions, creating bindings between C++ and JS state, and allowing JS endpoints to call functions implemented in C++.
Expand Down
14 changes: 7 additions & 7 deletions doc/architecture/ledger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ The following table describes the structure of a serialised transaction as it is
+ +------------------------------------------+-------------------------------------------------------------------------+
| | uint64_t | Length of serialised public domain |
+----------+------------------------------------------+-------------------------------------------------------------------------+
| | :cpp:type:`kv::EntryType` | Snapshot, or a WriteSet variant |
| | :cpp:type:`ccf::kv::EntryType` | Snapshot, or a WriteSet variant |
+ +------------------------------------------+-------------------------------------------------------------------------+
| | :cpp:type:`kv::Version` | Transaction version |
| | :cpp:type:`ccf::kv::Version` | Transaction version |
+ +------------------------------------------+-------------------------------------------------------------------------+
| | :cpp:type:`ccf::crypto::Sha256Hash` | User-defined claims digest, when entry type is WriteSetWith.*Claims |
| | :cpp:type:`ccf::crypto::Sha256Hash` | User-defined claims digest, when entry type is WriteSetWith.*Claims |
+ +------------------------------------------+-------------------------------------------------------------------------+
| | :cpp:type:`ccf::crypto::Sha256Hash` | Commit evidence digest, when entry type is WriteSetWithCommitEvidence.* |
| | :cpp:type:`ccf::crypto::Sha256Hash` | Commit evidence digest, when entry type is WriteSetWithCommitEvidence.* |
+ +------------------------------------------+-------------------------------------------------------------------------+
| | :cpp:type:`kv::Version` | Unused, reserved for compatibility |
| | :cpp:type:`ccf::kv::Version` | Unused, reserved for compatibility |
+ +------------------------------------------+-------------------------------------------------------------------------+
| | **Repeating [0..n]** | With ``n`` the number of maps in the transaction |
+ +-----+------------------------------------+-------------------------------------------------------------------------+
| | | std::string | Name of the serialised :cpp:type:`kv::Map` |
| | | std::string | Name of the serialised :cpp:type:`ccf::kv::Map` |
| +-----+------------------------------------+-------------------------------------------------------------------------+
| | | :cpp:type:`kv::Version` | Read version |
| | | :cpp:type:`ccf::kv::Version` | Read version |
| +-----+------------------------------------+-------------------------------------------------------------------------+
| | | uint64_t | Read count |
| | +------------------------------------+-------------------------------------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions doc/build_apps/example_cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Logging example application simply has:

.. note::

:cpp:type:`kv::Map` tables are the only interface between CCF and the replicated application, and the sole mechanism for it to have distributed state.
:cpp:type:`ccf::kv::Map` tables are the only interface between CCF and the replicated application, and the sole mechanism for it to have distributed state.

The Logging application keeps its state in a pair of tables, one containing private encrypted logs and the other containing public unencrypted logs. Their type is defined as:

Expand Down Expand Up @@ -54,7 +54,7 @@ The implementation of :cpp:func:`ccf::make_user_endpoints()` should return a sub
:lines: 1
:dedent:

The logging app defines :cpp:class:`ccf::LoggerHandlers`, which creates and installs handler functions or lambdas for several different HTTP endpoints. Each of these functions takes as input the details of the current request (such as the URI which was called, the query string, the request body), interacts with the KV tables using the given :cpp:class:`kv::Tx` object, and returns a result:
The logging app defines :cpp:class:`ccf::LoggerHandlers`, which creates and installs handler functions or lambdas for several different HTTP endpoints. Each of these functions takes as input the details of the current request (such as the URI which was called, the query string, the request body), interacts with the KV tables using the given :cpp:class:`ccf::kv::Tx` object, and returns a result:

.. literalinclude:: ../../samples/apps/logging/logging.cpp
:language: cpp
Expand Down
42 changes: 21 additions & 21 deletions doc/build_apps/kv/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,84 @@ Key-Value Store API

This page presents the API that a CCF application must use to access and mutate the replicated key-value store.

A CCF application should store its data in one or more :cpp:type:`kv::Map`. The name, type, and serialisation of these maps is under the application's control. Each invocation of an :cpp:class:`ccf::EndpointRegistry::Endpoint` is given a :cpp:class:`kv::Tx` transaction object, through which it can read and write to its :cpp:type:`kv::Map`.
A CCF application should store its data in one or more :cpp:type:`ccf::kv::Map`. The name, type, and serialisation of these maps is under the application's control. Each invocation of an :cpp:class:`ccf::EndpointRegistry::Endpoint` is given a :cpp:class:`ccf::kv::Tx` transaction object, through which it can read and write to its :cpp:type:`ccf::kv::Map`.

Map
---

.. doxygentypedef:: kv::Version
.. doxygentypedef:: ccf::kv::Version
:project: CCF

.. doxygenvariable:: kv::NoVersion
.. doxygenvariable:: ccf::kv::NoVersion
:project: CCF

.. doxygenclass:: kv::TypedMap
.. doxygenclass:: ccf::kv::TypedMap
:project: CCF

.. doxygentypedef:: kv::Map
.. doxygentypedef:: ccf::kv::Map
:project: CCF

.. doxygenclass:: kv::TypedValue
.. doxygenclass:: ccf::kv::TypedValue
:project: CCF

.. doxygentypedef:: kv::Value
.. doxygentypedef:: ccf::kv::Value
:project: CCF

.. doxygenclass:: kv::TypedSet
.. doxygenclass:: ccf::kv::TypedSet
:project: CCF

.. doxygentypedef:: kv::Set
.. doxygentypedef:: ccf::kv::Set
:project: CCF

Transaction
-----------

.. doxygenclass:: kv::ReadOnlyTx
.. doxygenclass:: ccf::kv::ReadOnlyTx
:project: CCF
:members: ro

.. doxygenclass:: kv::Tx
.. doxygenclass:: ccf::kv::Tx
:project: CCF
:members: rw, wo

Handles
-------

.. doxygenclass:: kv::ReadableMapHandle
.. doxygenclass:: ccf::kv::ReadableMapHandle
:project: CCF
:members:

.. doxygenclass:: kv::WriteableMapHandle
.. doxygenclass:: ccf::kv::WriteableMapHandle
:project: CCF
:members:

.. doxygenclass:: kv::MapHandle
.. doxygenclass:: ccf::kv::MapHandle
:project: CCF

.. doxygenclass:: kv::ReadableValueHandle
.. doxygenclass:: ccf::kv::ReadableValueHandle
:project: CCF
:members:

.. doxygenclass:: kv::WriteableValueHandle
.. doxygenclass:: ccf::kv::WriteableValueHandle
:project: CCF
:members:

.. doxygenclass:: kv::ValueHandle
.. doxygenclass:: ccf::kv::ValueHandle
:project: CCF

.. doxygenclass:: kv::ReadableSetHandle
.. doxygenclass:: ccf::kv::ReadableSetHandle
:project: CCF
:members:

.. doxygenclass:: kv::WriteableSetHandle
.. doxygenclass:: ccf::kv::WriteableSetHandle
:project: CCF
:members:

.. doxygenclass:: kv::SetHandle
.. doxygenclass:: ccf::kv::SetHandle
:project: CCF

Serialisation
-------------

.. doxygenenum:: kv::EntryType
.. doxygenenum:: ccf::kv::EntryType
:project: CCF
Loading

0 comments on commit b504a82

Please sign in to comment.