8000 Add more types and reassign tag numbers in CDDL by fxamacker · Pull Request #35 · fxamacker/ccf_draft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add more types and reassign tag numbers in CDDL #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 9, 2022

Conversation

fxamacker
Copy link
Owner

Closes #34

Added these type objects in CDDL:

  • struct interface type
  • resource interface type
  • contract interface type
  • reference type
  • restricted type

Added interface types as options to ccf-composite-type-message.

Added reference and restricted types as options to inline-type.

Added support for function value.

Refactored CDDL to separate type objects from type value objects for readability and cleaner implementation.

Reassigned tag numbers to reserve some tag numbers in each (sub)group. The following groups have assigned and reserved tag numbers [128, 255]:

  • root objects: 2 of 8 are assigned
  • types
    • inline: 9 of 24 are assigned
    • composite: 5 of 16 are assigned
    • interface: 3 of 8 are assigned
  • type values
    • non-composite and non-interface: 10 of 24 are assigned
    • composite: 5 of 16 are assigned
    • interface: 3 of 8 are assigned

Unassigned tag numbers within each group are reserved for that group. In addition, there are 24 reserved tag numbers that are not associated with any existing groups [232, 255].

Reassigned tag numbers to reserve some tag numbers in each
(sub)group.

Added these type objects in CDDL:
- struct interface type
- resource interface type
- contract interface type
- reference type
- restricted type

Added interface types as options to ccf-composite-type-message.

Added reference and restricted types as options to inline-type.

Added support for function value.

Refactored CDDL to separate type objects from type value objects for
readability and cleaner implemention.
@fxamacker fxamacker self-assigned this Dec 8, 2022
@fxamacker fxamacker requested a review from turbolent December 8, 2022 00:28
Comment on lines +597 to +602
; id is a unique identifier used by CCF to associate composite/interface type information
; with value through type-ref and type-value-ref.
id = bstr

; cadence-type-id is an identifier used by Cadence to identify types.
cadence-type-id = tstr
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to define "type aliases" 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
54AC
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more types and reassign CBOR tag numbers in CDDL
2 participants
0