uploadsize

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package uploadsize defines the same payload bounds for HTTP admission and direct executor uploads. Transport envelopes have their own encoded limits.

Index

Constants

View Source
const (
	MaxModuleBytes    = 24 << 20
	MaxStoredRunBytes = 32 << 20
	MaxBatchRuns      = 128
	RowCharge         = 512
)

Variables

View Source
var ErrLimit = errors.New("upload size limit reached")

Functions

func StoredBytes

func StoredBytes(wasm []byte, args, addresses []string, textFields ...string) (int64, error)

StoredBytes counts decoded WASM, base64/comma encoded argument/address columns, control/transaction text and fixed row metadata, without making a serialized payload copy. The executor's persisted queue uses this charge.

func StoredBytesForModule

func StoredBytesForModule(moduleBytes int64, args, addresses []string, textFields ...string) (int64, error)

StoredBytesForModule also serves the HTTP intent boundary before allocating decoded WASM. Its caller must supply an upper bound on the decoded length.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL