Use iterators for reputation contract #129

Open
opened 2025-12-28 18:08:37 +00:00 by sami · 1 comment
Owner

Originally created by @AnnaShaleva on GitHub (Jan 27, 2023).

Methods Get and GetByID restrict the maximum number of DataAuditResult with 2047 items (per epoch per node).
It may be critical for Get and GetByID returning an array of audit results for a certain epoch made by a single IR node in case of a large amount of audit results, so we need to return iterator from these methods.

IIUC, ListByEpoch is not affected and may be kept as is because it returns IRNodesCount results at max (hardly ever we have the number of IR nodes more than 2047).

Ref. #304.

Originally created by @AnnaShaleva on GitHub (Jan 27, 2023). Methods [Get](https://github.com/nspcc-dev/neofs-contract/blob/master/reputation/reputation_contract.go#L113) and [GetByID](https://github.com/nspcc-dev/neofs-contract/blob/dc89137484cd042e79378d4745558cc560b6368a/reputation/reputation_contract.go#L120) restrict the maximum number of `DataAuditResult` with 2047 items (per epoch per node). It may be critical for `Get` and `GetByID` returning an array of audit results for a certain epoch made by a single IR node in case of a large amount of audit results, so we need to return iterator from these methods. IIUC, `ListByEpoch` is not affected and may be kept as is because it returns IRNodesCount results at max (hardly ever we have the number of IR nodes more than 2047). Ref. #304.
Author
Owner

@roman-khimov commented on GitHub (Jul 11, 2025):

Deprioritizing this for now, reputation needs more attention in general.

@roman-khimov commented on GitHub (Jul 11, 2025): Deprioritizing this for now, reputation needs more attention in general.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-contract#129
No description provided.