From fb1548aca126e0dab60943730447d19a06a3eb4e Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:10:09 +0000 Subject: [PATCH 1/2] widen user-defined type name limit to 128 --- Stellar-contract-spec.x | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Stellar-contract-spec.x b/Stellar-contract-spec.x index 33c4cec..8131165 100644 --- a/Stellar-contract-spec.x +++ b/Stellar-contract-spec.x @@ -12,6 +12,12 @@ namespace stellar const SC_SPEC_DOC_LIMIT = 1024; +// The limit on the name of a user-defined type, and on a reference to one. It +// is longer than the limit on the names within a type, such as its fields or +// cases, because a type's name qualifies it: it is the name of the module or +// namespace the type is defined in, then the type's own name. +const SC_SPEC_TYPE_NAME_LIMIT = 128; + enum SCSpecType { SC_SPEC_TYPE_VAL = 0, @@ -82,7 +88,7 @@ struct SCSpecTypeBytesN struct SCSpecTypeUDT { - string name<60>; + string name; }; union SCSpecTypeDef switch (SCSpecType type) @@ -134,7 +140,7 @@ struct SCSpecUDTStructV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTStructFieldV0 fields<>; }; @@ -169,7 +175,7 @@ struct SCSpecUDTUnionV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTUnionCaseV0 cases<>; }; @@ -184,7 +190,7 @@ struct SCSpecUDTEnumV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTEnumCaseV0 cases<>; }; @@ -199,7 +205,7 @@ struct SCSpecUDTErrorEnumV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTErrorEnumCaseV0 cases<>; }; From 0170c23d689c319d1edd71533eb1c487ff778545 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 31 Jul 2026 05:31:23 +0000 Subject: [PATCH 2/2] raise type name limit to 256 --- Stellar-contract-spec.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stellar-contract-spec.x b/Stellar-contract-spec.x index 8131165..9e93f19 100644 --- a/Stellar-contract-spec.x +++ b/Stellar-contract-spec.x @@ -16,7 +16,7 @@ const SC_SPEC_DOC_LIMIT = 1024; // is longer than the limit on the names within a type, such as its fields or // cases, because a type's name qualifies it: it is the name of the module or // namespace the type is defined in, then the type's own name. -const SC_SPEC_TYPE_NAME_LIMIT = 128; +const SC_SPEC_TYPE_NAME_LIMIT = 256; enum SCSpecType {