7.0.0
Release highlights: CCF 7.0.0 is a major release with significant architectural and API changes:
cchosthas been removed. Each CCF application is now built as its own standalone binary. Theadd_ccf_appCMake function builds an executable; callers provide amainfunction and invokeccf::run()(seesamples/apps/main.cpp). Thejs_genericsample is now installed at/ccf/bin/js_generic. The separate "run" package is no longer published — only the-develpackage is available.- Unified platform build. There is no longer a separate SNP or Virtual build. A single build auto-detects the platform at runtime, so the
COMPILE_TARGETCMake option and per-platform release artifacts are gone.- Classic governance API removed. The legacy
/govendpoints (without anapi-versionquery parameter), deprecated since 5.0.0, have been removed. All/govendpoints now require passing anapi-versionquery parameter. The most recent value is2024-07-01.- COSE-only ledger signatures. Networks can start in COSE-only signing mode or transition from dual signing, and a new
/receipt/coseendpoint returns COSE Sign1 receipts with Merkle proofs (see https://datatracker.ietf.org/doc/draft-ietf-cose-merkle-tree-proofs/18/ and https://datatracker.ietf.org/doc/draft-ietf-scitt-receipts-ccf-profile/01/ for a full specification).- Commit-aware endpoints. Endpoints can now defer their HTTP response until the transaction reaches a terminal consensus state (committed or invalidated), with optional inline receipt construction at commit time.
- Improved snapshot management. Backup nodes can auto-fetch snapshots from the primary, snapshots can be scheduled by wall-clock interval, and new file-cleanup options automatically prune old ledger chunks and snapshots.
Developer API
C++
Added
- Added support for endpoints that defer their HTTP response until the submitted transaction reaches a terminal consensus state (committed or invalidated). A
set_consensus_committed_function()call on theRpcContextregisters a callback invoked once the transaction is globally committed or invalidated. The callback receives aCommittedTxInfo&struct (containingrpc_ctx,tx_id,status,write_set_digest,commit_evidence,claims_digest). See the logging sample app (/log/private/optional_commitand/log/blocking/private) for example usage (#7562, #7785). - Added support for inline transaction receipt construction at commit time. Endpoint authors can use
build_receipt_for_committed_tx()to construct a fullTxReceiptImplfrom theCommittedTxInfopassed to their consensus committed callback. See the logging sample app (/log/blocking/private/receipt) for example usage (#7785). - Added
COSEVerifier::verify_decomposed()method that accepts pre-parsed COSE_Sign1 components, bypassing envelope parsing. - Added
ccf::describe_cose_receipt_v1(receipt)to obtain COSE receipts with Merkle proof (#7700). - Added
make_cose_verifier_from_pem_cert()andmake_cose_verifier_from_der_cert(). The existingmake_cose_verifier_cert()is renamed tomake_cose_verifier_any_cert()(#7768). NetworkIdentitySubsystemInterfacenow exposesget_trusted_keys(), returning all trusted network identity keys as aTrustedKeysmap (#7690).- Added
ccf::IdentityHistoryNotFetchedexception type to distinguish identity-history-fetching errors from other logic errors in the network identity subsystem (#7708).
Changed
cchostis removed, and each application now provides its own executable. CCF nodes no longer contain a separatecchostexecutable and enclave library (.so) file. Each former enclave library is now its own executable. Thejs_genericsample app is now an executable installed at/ccf/bin/js_generic. Theadd_ccf_appfunction in CMake now builds an executable rather than a library — the caller should provide amainfunction and callccf::run()frominclude/ccf/run.hto start the node (seesamples/apps/main.cppfor a minimal example).- Crypto interface refactored for RSA and EC keys (#7425):
ccf::crypto::PublicKeybecomesccf::crypto::ECPublicKey.ccf::crypto::KeyPairbecomesccf::crypto::ECKeyPair.- Error-prone inheritance between RSA and EC key classes has been removed.
- RSA keys no longer re-use CSR functionality from the EC key interface.
set_consensus_committed_function()has moved from an endpoint-registration-time decorator to a runtime call onctx.rpc_ctx->set_consensus_committed_function(). The callback signature now receives aCommittedTxInfo&struct instead of individual arguments. This allows the same endpoint to conditionally block until committed based on per-request state.ccf::endpoints::default_respond_on_commit_funchas been removed from the public API; a sample implementation is provided in the logging and basic sample apps (#7785).- In the C++ API,
get_txid()onccf::kv::ReadOnlyStorehas been renamed tocurrent_txid()(#7477). ccf::crypto::HashProvider::Hash()has been renamed toccf::crypto::HashProvider::hash()(#7660).ccf::historical::verify_self_issued_receiptnow verifies COSE CCF receipts against the current service identity, including receipts signed by past service identities if they were back-endorsed (#7494, #7546).- Application code (in both C++ and JS) can now access the current time directly, with no concept of enclave time vs untrusted host time.
- Application logging no longer traverses the ringbuffer and is now immediately sent to stdout. The format of CCF's stdout logging has changed: alignment padding for enclave timestamps has been removed (#7491).
Removed
ccf::historical::adapter_v3has been removed; useccf::historical::read_only_adapter_v4andccf::historical::read_write_adapter_v4instead (#7553).- Removed
CHECK0()fromccf::crypto::OpenSSLin the public headeropenssl_wrappers.h(#7817). - Removed
aes_gcm_encrypt(),aes_gcm_decrypt(), anddefault_ivfromccf::crypto(#7811). - Removed
get_responder()from the publicccf::RpcContextAPI and madehttp_responder.ha private header (#7818). - Removed
ccf::crypto::openssl_sha256_init()andccf::crypto::openssl_sha256_shutdown()(#7251). - Removed the
ccf/pal/hardware_info.hheader (#7117). - Removed the
make_[read_only_]endpoint_with_local_commit_handlermethods onEndpointRegistry(#7487).
Deprecated
get_untrusted_host_time_v1in the C++ API is deprecated, and will be removed in a future release.
TypeScript/JavaScript
- Added
toArrayBuffertoccfapp/utilswhich convertsArrayBufferLiketoArrayBuffer(#7171). - Removed the unused experimental
ccf.host.triggerSubprocess()JS API. ccf.enableUntrustedDateTimein the JS API is deprecated, and will be removed in a future release.
Governance
Added
- Added
ccf.gov.validateConstitutionfunction to the JS API for validating basic properties of a proposed constitution. This is called in the default sample constitution'sset_constitution.validate.
Removed
- The classic governance API which was deprecated in 5.0.0 has been removed. Any operations under
/govwhich do not take anapi-versionquery parameter are no longer available. - Removed fallback JWT authentication (#7442). It is recommended to clean up old tables for services started before 6.x — see
cleanup_legacy_jwt_recordsproposal in the default sample constitution.
Operations
Added
- Added support for COSE-only ledger signatures. Networks can start in COSE-only mode or transition from dual signing, see documentation for details (#7772).
- Backup nodes can now be configured to automatically fetch snapshots from the primary when snapshot evidence is detected. This is controlled by the
snapshots.backup_fetchconfiguration section, withenabled,max_attempts,retry_interval,max_sizeandtarget_rpc_interfaceoptions. The target RPC interface must have theSnapshotReadoperator feature enabled. Snapshot fetching occurs in response to aStartupSeqnoIsOlderror during join, and fetched snapshots are verified before use (#7314, #7630). - Added time-based snapshot scheduling. Snapshots can now be triggered after a configurable wall-clock interval (
snapshots.time_interval) elapses, in addition to the existing transaction-count threshold (snapshots.tx_count). A newsnapshots.min_tx_countoption (default 2) sets the minimum number of transactions required before a time-based snapshot fires (#7731). - Added
files_cleanup.max_committed_ledger_chunksconfiguration option to limit the number of committed ledger chunk files retained in the main ledger directory. When exceeded, the oldest chunks are automatically deleted, but only after verifying that an identical copy exists in at least oneledger.read_only_directoriesentry. At least one read-only ledger directory must be configured; the node will refuse to start otherwise. See documentation for details. - Added
files_cleanup.max_snapshotsconfiguration option to limit the number of committed snapshot files retained on disk. When exceeded, the oldest snapshots are automatically deleted. The value must be at least 1 if set. - Added
files_cleanup.intervalconfiguration option (default"30s") to periodically scan and delete old committed snapshots exceedingmax_snapshots. - Added
POST /node/snapshot:create, gated by theSnapshotCreateRPC interface operator feature, to create a snapshot via an operator endpoint rather than a governance action. - Added experimental self-healing recovery (recovery-decision-protocol) for automatically transitioning-to-open during disaster recovery without operator intervention. Local sealing recovery now stores sealed secrets in the ledger, with recovery keys in
public:ccf.gov.nodes.sealed_recovery_keysand encrypted shares inpublic:ccf.internal.sealed_shares. The constitution is updated to reseal whenever a node is added. The feature is configured via thesealing-recoveryconfiguration section (#7189, #7554, #7679). - Added support for self-transparent code update policies (#7681). See documentation for details.
- Enabled PreVote optimisation, requiring followers to check electability before becoming candidates. This improves Raft availability under omission faults such as partial network partitions (#7419, #7445, #7462).
- Added ProposeRequestVote on SIGTERM. When a primary with
ignore_first_sigtermreceives the first SIGTERM, it nominates a successor, allowing the successor to call an election immediately without waiting for the election timeout (#7514). - Added support for Turin and Genoa attestations (#7499, #7051).
- Added
verify_uvm_attestation_and_endorsementsbinary to test authentication of startup files during start and join on C-ACI. - Added
verify_attestationscript to fetch endorsements from AMD and check the provided attestation against them (#7499). - Added
read_ledger.py--verification-leveloption (NONE, OFFSETS, HEADERS, MERKLE, FULL), allowing users to trade off between computation cost and security guarantees. The--insecure-skip-verificationflag is deprecated in favor of--verification-level=NONE. - Added
scripts/coverage.shto aggregate LLVM coverage data produced by tests built with-DCOVERAGE=ON. - Node will now retry when fetching snapshots, controlled by
command.join.fetch_snapshot_max_attemptsandcommand.join.fetch_snapshot_retry_interval(#7317). - Accept UVM endorsements with SVNs encoded as integers (#7316).
- Added logging of the initial node attestation value (#7256).
Changed
- CCF no longer has platform-specific builds. The single build configuration runs on both SNP and Virtual, automatically detecting the current platform at runtime. The
COMPILE_TARGETCMake option is no longer required, and release artifacts no longer have a platform in their path. - Snapshots now carry COSE receipts; JSON receipts are no longer included (#7711).
- Refactored the user-facing surface of local sealing and self-healing recovery. The feature is now called
sealing-recoverywith self-healing-open referred to asrecovery-decision-protocol. Local sealing is enabled via thesealing-recoveryconfig field; the local sealing identity is undersealing-recovery.location.name; the recovery-decision-protocol is configured viasealing-recovery.recovery_decision_protocol(#7679). - On recovery, the UVM descriptor SVN is now set to the minimum of the previously stored value in the KV and the value found in the new node's startup endorsements (#7716).
- CA certificates issued by CCF (ie -
service_cert.pem) now include akeyUsageextension, to comply with RFC5280 (#7134). - The
logging.host_levelconfiguration option and--enclave-log-levelCLI switch are replaced by a combined--log-levelCLI switch (#7104). - Drop support for
5.*Linux kernels exposing/dev/sev. Only6.*+Linux kernels exposing/dev/sev-guestare now supported (#7109). - Start nodes now confirm that read-only ledger directories are empty on startup (#7355).
- The snapshot-serving endpoints required for snapshot fetch behaviour are now disabled-by-default. They should be enabled on a per-interface basis by adding
"enabled_operator_features": ["SnapshotRead"]to the interface's configuration. - The
submit_recovery_share.shscript will no longer try to create a virtual environment and install the CCF Python package on every call. It returns an error ifccf_cose_sign1cannot be found (#7306).
Removed
cchostand the CCF "run" package are removed. Only the-develpackage is published. CCF provides ccfapp CPack settings to pull in all runtime dependencies. See Packaging your C++ app (#7187).- Removed ACME client and support for ACME-endorsed interfaces (#7414).
- Removed support for v2 attestations as the corresponding firmware is known to be insecure (#7282).
Deprecated
snapshots.read_only_directoryconfiguration option is deprecated. Usesnapshots.backup_fetchinstead.
Client API
- Added
/receipt/coseendpoint returning a COSE Sign1 receipt with Merkle proof for a given transaction. Returns 404 if no COSE receipt is available (e.g. for signature transactions) (#7772). - Added
GETandHEAD/node/ledger_chunkand/node/ledger_chunk/{chunk_name}endpoints, gated by theLedgerChunkDownloadRPC interface operator feature. These endpoints, along with/node/snapshot/{snapshot_name}, supportWant-Repr-Digest/Repr-Digestheaders (RFC 9530, algorithmssha-256,sha-384,sha-512) andETag/If-None-Matchfor conditional downloads (#7650, #7652). See documentation for details. - The
sincequery parameter onGET /node/snapshotnow uses closed (inclusive) semantics, consistent withGET /node/ledger_chunk(#7742). - Removed the
/node/memoryendpoint, which was originally useful for monitoring SGX enclave memory usage.
Dependencies
- Updated snmalloc to 0.7.3.
- CCF now uses Rust components for CBOR (EverCBOR) and COSE functionality, replacing the previous C/C++ dependencies.
Bug Fixes
- Fixed the Turin SEV-SNP CPUID mapping used for product detection (#7748).
- Fixed cache size calculations for historical queries, resolving a bug where signature transactions could become orphaned and fill the cache (#7755).
- x509 parsing now correctly handles validity times beyond 2262. Some public function signatures now use
ccf::nonstd::SystemClocktime points (#7648). - Only rollback uncommittable indices during become_leader (#7620).
- Join client now sets SNI correctly (#7622).
- CBOR and COSE dependencies are now internal; their headers are no longer exposed (#7616, #7617).
- Fixed linking issue that could affect applications not including
main.cppin their executable (#7595). - Fixed two issues that could affect build reproducibility (#7606, #7607).
- Python test dependency update (#7609).
- CheckQuorum now requires a quorum in every configuration (#7375).
- Correctly validate the full AMD ASK endorsement chain (#7233).
- Validate endorsement metadata (tcb version and chip id) against attestation (#7240).
- Improved error messages when failing to fetch collateral (#7103).
- Improved handling of socket errors in curlm callbacks (#7308).