Skip to content

Commit 0e3c85c

Browse files
authored
Update README.md
1 parent 5404aae commit 0e3c85c

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11

22
# Cadence Compact Format (CCF)
33

4-
Cadence Compact Format (CCF) is a data format designed for compact, efficient, and deterministic encoding of [Cadence](https://github.com/onflow/cadence) external values. CCF is defined in [ccf_specs.md](ccf_specs.md).
4+
CCF is defined in [ccf_specs.md](ccf_specs.md).
5+
6+
The [CCF codec](https://github.com/onflow/cadence/tree/master/encoding/ccf) in Cadence is used for encoding events in CCF. However, some CCF options are not yet implemented in the codec.
7+
8+
"Abstract" and "Introduction" sections in this README were copied from the CCF specs. Additional content such as benchmarks will be added to the README later.
9+
10+
## Abstract
11+
12+
Cadence Compact Format (CCF) is a data format designed for compact, efficient, and deterministic encoding of [Cadence](https://github.com/onflow/cadence) external values.
513

614
Cadence is a resource-oriented programming language that introduces new features to smart contract programming. It's used by [Flow](https://github.com/onflow/flow-go) blockchain and has a syntax inspired by Swift, Kotlin, and Rust. Its use of resource types maps well to the Move language.
715

8-
CCF can be used as a hybrid data format. CCF-based messages can be fully self-describing or partially self-describing. Both are more compact than JSON-based messages. CCF-based protocols can send Cadence metadata just once for all messages of that type. Malformed data can be detected without Cadence metadata and without creating Cadence objects.
16+
CCF messages can be fully self-describing or partially self-describing. Both are more compact than JSON-based messages. CCF-based protocols can send Cadence metadata just once for all messages of that type. Malformed data can be detected without Cadence metadata and without creating Cadence objects.
917

10-
CCF obsoletes [JSON-Cadence Data Interchange Format](https://developers.flow.com/cadence/json-cadence-spec) for use cases that do not require JSON.
18+
CCF defines "Deterministic CCF Encoding Requirements" and makes it optional. It allows CCF codecs implemented in different programming languages to produce the same deterministic encodings. CCF-based formats and protocols can balance tradeoffs by specifying how they use CCF options.
19+
20+
CCF obsoletes [JSON-Cadence Data Interchange Format](https://developers.flow.com/cadence/json-cadence-spec) (JSON-CDC) for use cases that do not require JSON.
1121

1222
### Introduction
1323

@@ -28,6 +38,12 @@ CCF uses CBOR and is designed to allow efficient detection and rejection of malf
2838

2939
CBOR is an [Internet Standard](https://www.ietf.org/rfc/std-index.txt) defined by [IETF STD 94](https://www.rfc-editor.org/info/std94). CBOR is designed to be relevant for decades and is used by data formats and protocols such as [W3C WebAuthn](https://www.w3.org/TR/webauthn-2/), C-DNS ([IETF RFC 8618](https://www.rfc-editor.org/rfc/rfc8618.html)), COSE ([IETF STD 96](https://www.rfc-editor.org/info/std96)), CWT ([IETF RFC 8392](https://www.rfc-editor.org/info/rfc8392)), etc.
3040

41+
## History
42+
43+
Commit history and contributions to `ccf_specs.md` file prior to Nov 29, 2022 are associated with `README.md` file.
44+
45+
Old branches can be found at https://github.com/fxamacker/ccf_draft.
46+
3147
## License
3248

3349
CCF is licensed under the terms of the Apache License, Version 2.0. See [LICENSE](LICENSE) for more information.

0 commit comments

Comments
 (0)