anza-xyz / anza-xyz/kit

Transaction messages: validate loaded accounts data size limit config

Aperta
#2,004 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
695
Fork
210
Merge medio
21h 33m
PR unite (30g)
90

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.