@@ -330,8 +330,10 @@ where:
330330 (normally the limit for it is MaxVerificationGAS from Policy, but if MaxGasInvoke
331331 is lower than that then this limit is respected).
332332- ` MaxIteratorResultItems ` - maximum number of elements extracted from iterator
333- returned by ` invoke* ` call. When the ` MaxIteratorResultItems ` value is set to
334- ` n ` , only ` n ` iterations are returned and truncated is true, indicating that
333+ returned by ` invoke* ` call in cases if ` SessionEnabled ` is false or
334+ ` SessionExpansionEnabled ` is true. When the ` MaxIteratorResultItems ` value is
335+ set to ` n ` , only ` n ` iterations are returned and truncated is true (if
336+ ` SessionEnabled ` is false, see ` SessionEnabled ` setting), indicating that
335337 there is still data to be returned.
336338- ` MaxFindResultItems ` - the maximum number of elements for ` findstates ` response.
337339- ` MaxFindStoragePageSize ` - the maximum number of elements for ` findstorage ` response per single page.
@@ -358,23 +360,26 @@ where:
358360 on the server side available for further traverse. ` traverseiterator ` and
359361 ` terminatesession ` JSON-RPC calls will be handled by the server. It is not
360362 recommended to enable this setting for public RPC servers due to possible DoS
361- attack. Set to ` false ` by default. If ` false ` , iterators are expanded into a
362- set of values (see ` MaxIteratorResultItems ` setting). Implementation note: when
363- BoltDB storage is used as a node backend DB, then enabling iterator sessions may
364- cause blockchain persist delays up to 2* ` SessionLifetime ` on
365- early blockchain lifetime stages with relatively small DB size. It can happen
366- due to BoltDB re-mmapping behaviour traits. If regular persist is a critical
367- requirement, then we recommend either to decrease ` SessionLifetime ` or to
368- enable ` SessionBackedByMPT ` , see ` SessionBackedByMPT ` documentation for more
363+ attack. Set to ` false ` by default. If ` false ` or ` SessionExpansionEnabled ` ,
364+ iterators are expanded into a set of values (see ` MaxIteratorResultItems ` and
365+ ` SessionExpansionEnabled ` settings). Implementation note: when BoltDB storage
366+ is used as a node backend DB, then enabling iterator sessions may cause
367+ blockchain persist delays up to 2* ` SessionLifetime ` on early blockchain
368+ lifetime stages with relatively small DB size. It can happen due to BoltDB
369+ re-mmapping behaviour traits. If regular persist is a critical requirement,
370+ then we recommend either to decrease ` SessionLifetime ` or to enable
371+ ` SessionBackedByMPT ` , see ` SessionBackedByMPT ` documentation for more
369372 details.
370373- ` SessionExpansionEnabled ` enables partial expansion of iterators returned by
371374 ` invoke* ` calls. When enabled, the server returns up to ` MaxIteratorResultItems `
372375 values from the iterator in the initial response. If more items are available,
373- the result is marked as truncated. When ` SessionEnabled ` is also true, the
374- remaining iterator state is stored in a session, allowing further traversal
375- via ` traverseiterator ` . If disabled, iterators are either expanded up to
376- ` MaxIteratorResultItems ` or require explicit traversal via session-based calls.
377- By default, ` SessionExpansionEnabled ` is set to ` false ` .
376+ the result is marked as truncated (if ` SessionEnabled ` is false). When
377+ ` SessionEnabled ` is also true, the remaining iterator state (if so) is stored
378+ in a session, allowing further traversal via ` traverseiterator ` ; iterator ID
379+ field remains empty for cases when the iterator doesn't have more items after
380+ expansion. If disabled, iterators are either expanded up to
381+ ` MaxIteratorResultItems ` or require explicit traversal via session-based
382+ calls. By default, ` SessionExpansionEnabled ` is set to ` false ` .
378383- ` SessionLifetime ` (` Duration ` ) is a lifetime of iterator session. It is set to
379384 ` TimePerBlock ` seconds (but not less than 5s) by default and is relevant
380385 only if ` SessionEnabled ` is set to ` true ` .
0 commit comments