anza-xyz / anza-xyz/kit

Transaction messages: validate loaded accounts data size limit config

Abierto
#2,004 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
695
Forks
210
Merge medio
21 h 33 min
PR fusionados (30 d)
90

Descripción

The loaded accounts data size limit has runtime bounds too, which Kit doesn't validate. Follow-up to #1961 / #1962, which #1972 addressed for heap size and compute units.

The runtime accepts an integer in [1, 64 * 1024 * 1024]
Unlike heap it doesn't need to be a multiple of anything, any byte value in range is legal.

- As with CUs, a requested value above max is silently clamped to max
- Unlike the other fields, the value `0` is invalid.

We will need to figure out what to do with our provisory limit in `resource-limit-estimation.ts` which is 0, so eg. `fillTransactionMessageProvisoryResourceLimits` sets it to 0 on v1 transactions. So asserting non-zero in `setTransactionMessageLoadedAccountsDataSizeLimit` would break that function.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.