Releases: microsoft/CCF
Releases · microsoft/CCF
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 reco...
7.0.0-rc2
Added
- Added support for COSE-only ledger signatures. Networks can start in COSE-only mode or transition from dual signing (#7772).
- 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).
Changed
set_consensus_committed_function()has moved from an endpoint-registration-time decorator (Endpoint::set_consensus_committed_function()) to a runtime call on the RPC context (ctx.rpc_ctx->set_consensus_committed_function()). This allows the same endpoint to conditionally block until committed based on query parameters, headers, or other per-request state. The endpoint-level method has been removed. See the logging sample app (/log/private/optional_commit) for example usage.
Removed
- 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 the
/node/memoryendpoint. This endpoint was originally useful for monitoring SGX enclave memory usage, which is no longer relevant now that SGX support has been removed.
7.0.0-rc1
Added
- 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 theirConsensusCommittedEndpointFunctioncallback. See the logging sample app (/log/blocking/private/receipt) for example usage (#7785).
Changed
- The
ConsensusCommittedEndpointFunctioncallback signature now receives aCommittedTxInfo&struct (containingrpc_ctx,tx_id,status,write_set_digest,commit_evidence,claims_digest) instead of individual arguments. This enables commit callbacks to construct receipts inline (#7785). 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).
Deprecated
snapshots.read_only_directoryconfiguration option is deprecated and will be removed in a future release. A warning will be logged if this option is set at startup. Usesnapshots.backup_fetchto have backup nodes automatically fetch snapshots from the primary node instead.
7.0.0-rc0
Added
- Added
files_cleanup.max_snapshotsconfiguration option to limit the number of committed snapshot files retained on disk. When the number of committed snapshots exceeds this value, the oldest snapshots (by sequence number) are automatically deleted. The value must be at least 1 if set. - Added
files_cleanup.intervalconfiguration option (default"30s") to periodically scan the snapshot directory and delete old committed snapshots exceedingmax_snapshots. This ensures backup nodes (which receive snapshots viabackup_fetch) also prune old snapshots. Only effective whenmax_snapshotsis set. - 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
make_cose_verifier_from_pem_cert()andmake_cose_verifier_from_der_cert()that accept certificates in a known format. The existingmake_cose_verifier_cert()is renamed tomake_cose_verifier_any_cert()(#7768).
Changed
- The
sincequery parameter on theGET /node/snapshotendpoint now uses closed (inclusive) semantics, consistent with thesinceparameter onGET /node/ledger_chunk. A request with?since=Nwill now return snapshots with index greater than or equal toN, rather than strictly greater thanN(#7742).
6.0.27
6.0.26
7.0.0-dev13
Added
- 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. Snapshot timing state is replicated to backups via a newpublic:ccf.internal.snapshot_statusinternal table (#7731). - Added support for endpoints that defer their HTTP response until the submitted transaction reaches a terminal consensus state (committed or invalidated). Endpoint authors can call
set_consensus_committed_function()when installing an endpoint to register a callback that is invoked once the transaction is globally committed or invalidated. The callback receives theccf::TxIDand accf::FinalTxStatus(eitherCommittedorInvalid), and may inspect or modify the response before it is sent. A built-inccf::endpoints::default_respond_on_commit_funcis provided that returns the original response on commit, or an error on invalidation. See the logging sample app (/log/blocking/private) for example usage (#7562).
Fixed
- Fixed the Turin SEV-SNP CPUID mapping used for product detection. (#7748)
6.0.25
7.0.0-dev12
Added
- 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. Note that the target RPC interface selected must have theSnapshotReadoperator feature enabled. - Added
ccf::IdentityHistoryNotFetchedexception type to distinguish identity-history-fetching errors from other logic errors in the network identity subsystem (#7708). - Added
ccf::describe_cose_receipt_v1(receipt)to obtain COSE receipts with Merkle proof in unprotected header for non-signature TXs, and empty unprotected header for signature TXs (#7700). NetworkIdentitySubsystemInterfacenow exposesget_trusted_keys(), returning all trusted network identity keys as aTrustedKeysmap (#7690).- Added support for self-transparent code update policies (#7681).
Changed
- 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. On start, the behaviour is unchanged (#7716).
- Refactored the user facing surface of self-healing-open and local sealing. The whole feature is now
sealing-recoverywithself-healing-opennow referred to as therecovery-decision-protocol(#7679). - Local sealing is enabled by setting the
sealing-recoveryconfig field (for both the sealing node, and the unsealing recovery node). - The local sealing identity is under
sealing-recovery.location.name. - The recovery-decision-protocol is configured via
sealing-recovery.recovery_decision_protocol. - Snapshots now carry COSE receipts, JSON receipts are no longer included (#7711).
6.0.24
Fixed
- Fix race condition when initialising a ledger secret's commit secret (#7689)
- Add missing cases for
FailedInvalidCPUIDandFailedInvalidTcbVersionin quote verification error handling (#7696). - 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. On start, the behaviour is unchanged (#7716).