You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,23 @@
1
1
2
2
# Cadence Compact Format (CCF)
3
3
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.
5
13
6
14
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.
7
15
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.
9
17
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.
11
21
12
22
### Introduction
13
23
@@ -28,6 +38,12 @@ CCF uses CBOR and is designed to allow efficient detection and rejection of malf
28
38
29
39
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.
30
40
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
+
31
47
## License
32
48
33
49
CCF is licensed under the terms of the Apache License, Version 2.0. See [LICENSE](LICENSE) for more information.
0 commit comments