Skip to content

Allow maxtotalbytes to be specified on top types - #40

Merged
jannotti merged 1 commit into
masterfrom
maxtotalbytes-directive
Oct 9, 2026
Merged

jannotti merged 1 commit into
masterfrom
maxtotalbytes-directive

Conversation

@jannotti

@jannotti jannotti commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

This is so that maxtotalbytes can be declared on a top-level type, just as allocbound and so on.

@jannotti
jannotti requested review from algorandskiy and cce October 7, 2026 17:54
@cce

cce commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

maxtotalbytes is not enforced at decode time, afaict it just replaces the generated MaxSize()

@jannotti

jannotti commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

maxtotalbytes is not enforced at decode time, afaict it just replaces the generated MaxSize()

I know, but shouldn't it be correct? Otherwise why have it at all?

I'm hoping to use it as an allocbound when a type is being encoded inside another type.

@jannotti
jannotti merged commit 7e85189 into master Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants