Skip to content

Commit cf0c655

Browse files
Merge pull request #2497 from oasisprotocol/martin/increase-max-metadata-pairs
runtime-sdk/src/modules/rofl: Bump MAX_METADATA_PAIRS to 128
2 parents 3f6782b + c797d98 commit cf0c655

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

rofl-client/ts/src/roflClient.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ export class RoflClient {
311311
* it will trigger an automatic on-chain registration refresh. Keys are automatically
312312
* namespaced with 'net.oasis.app.' when published on-chain.
313313
*
314-
* Metadata is validated against runtime-configured limits (typically max 64 pairs,
315-
* max key size 1024 bytes, max value size 16KB).
314+
* Metadata is validated against runtime-configured limits.
316315
*
317316
* @param metadata - Dictionary of metadata key-value pairs to set
318317
* @returns Promise that resolves when metadata is successfully updated

runtime-sdk/src/modules/rofl/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ pub trait Config: 'static {
2626
const GAS_COST_CALL_DERIVE_KEY: u64 = 10_000;
2727

2828
/// Maximum number of metadata key-value pairs.
29-
const MAX_METADATA_PAIRS: usize = 64;
29+
/// TODO: Enforce cumulative metadata size limit instead of fixed per-pair sizes.
30+
/// See https://github.com/oasisprotocol/oasis-sdk/issues/2489.
31+
const MAX_METADATA_PAIRS: usize = 128;
3032
/// Maximum metadata key size.
3133
const MAX_METADATA_KEY_SIZE: usize = 1024;
3234
/// Maximum metadata value size.

0 commit comments

Comments
 (0)