neo-go/pkg/config/limits/limits.go
Roman Khimov 8cd7b93208 limits: new package with storage limits
Packages like core/state or core/mpt shouldn't import whole core/storage just
to get some constant value, it's not a good dependency.
2022-07-08 23:30:30 +03:00

17 lines
659 B
Go

/*
Package limits contains a number of system-wide hardcoded constants.
Many of the Neo protocol parameters can be adjusted by the configuration, but
some can not and this package contains hardcoded limits that are relevant for
many applications.
*/
package limits
const (
// MaxStorageKeyLen is the maximum length of a key for storage items.
// Contracts can't use keys longer than that in their requests to the DB.
MaxStorageKeyLen = 64
// MaxStorageValueLen is the maximum length of a value for storage items.
// It is set to be the maximum value for uint16, contracts can't put
// values longer than that into the DB.
MaxStorageValueLen = 65535
)