Skip to content

container: calculate container estimations on contract side#507

Merged
cthulhu-rider merged 1 commit intomasterfrom
feat/new-contract-side-container-estimations
Aug 18, 2025
Merged

container: calculate container estimations on contract side#507
cthulhu-rider merged 1 commit intomasterfrom
feat/new-contract-side-container-estimations

Conversation

@carpawell
Copy link
Member

Accept container estimations report made by storage nodes directly from every netmap member (limiting max number of reports per epoch by 3). Keep an average value for every container. Add API for fetching new estimations and allow checking what exact report every storage node made. Extend "container estimation" term to (size, objectsNumber) pair. Closes #501.

@carpawell carpawell self-assigned this Aug 14, 2025
@codecov
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 78.19549% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.22%. Comparing base (63a8dea) to head (38ac6f6).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
contracts/container/contract.go 78.19% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #507      +/-   ##
==========================================
- Coverage   62.55%   62.22%   -0.33%     
==========================================
  Files          23       23              
  Lines        3301     3328      +27     
==========================================
+ Hits         2065     2071       +6     
- Misses       1236     1257      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@carpawell carpawell marked this pull request as ready for review August 14, 2025 16:01
@carpawell carpawell force-pushed the feat/new-contract-side-container-estimations branch from 6bf257f to 003a573 Compare August 14, 2025 16:01
@carpawell carpawell requested a review from End-rey August 14, 2025 16:01
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks correct

@carpawell carpawell force-pushed the feat/new-contract-side-container-estimations branch from 003a573 to 9483999 Compare August 18, 2025 11:43
cthulhu-rider
cthulhu-rider previously approved these changes Aug 18, 2025
Accept container estimations report made by storage nodes directly from every
netmap member (limiting max number of reports per epoch by 3). Keep an average
value for every container. Add API for fetching new estimations and allow
checking what exact report every storage node made. Extend "container
estimation" term to (size, objectsNumber) pair. Closes #501.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the feat/new-contract-side-container-estimations branch from 9483999 to 38ac6f6 Compare August 18, 2025 14:39
@cthulhu-rider cthulhu-rider merged commit c8cfdf7 into master Aug 18, 2025
9 of 10 checks passed
@cthulhu-rider cthulhu-rider deleted the feat/new-contract-side-container-estimations branch August 18, 2025 16:02
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 21, 2025
Implementation of nspcc-dev/neofs-contract#507. Also,
drop IR's old API controlling estimations flow (StartEstimation/StopEstimation).
Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 21, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 21, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 22, 2025
Implementation of nspcc-dev/neofs-contract#507. Also,
drop IR's old API controlling estimations flow (StartEstimation/StopEstimation).
Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 22, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 25, 2025
Implementation of nspcc-dev/neofs-contract#507. Also,
drop IR's old API controlling estimations flow (StartEstimation/StopEstimation).
Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 25, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 26, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 26, 2025
Implementation of nspcc-dev/neofs-contract#507. Also,
drop IR's old API controlling estimations flow (StartEstimation/StopEstimation).
Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 26, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 27, 2025
This brings nspcc-dev/neofs-contract#507 and allows IRs
and SNs use new container estimations API. Refs #3460.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 28, 2025
Transfer assets according to new reports from
nspcc-dev/neofs-contract#507. Simplify processor's
logic. Do not use a separate "bank" account, transfer directly from container
owner to storage nodes instead. Pay for exact reported values, do not calculate
size estimations. Closes #3053.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 28, 2025
Transfer assets according to new reports from
nspcc-dev/neofs-contract#507. Simplify processor's
logic. Do not use a separate "bank" account, transfer directly from container
owner to storage nodes instead. Pay for exact reported values, do not calculate
size estimations. Closes #3053.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 29, 2025
Transfer assets according to new reports from
nspcc-dev/neofs-contract#507. Simplify processor's
logic. Do not use a separate "bank" account, transfer directly from container
owner to storage nodes instead. Pay for exact reported values, do not calculate
size estimations. Closes #3053.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 29, 2025
Transfer assets according to new reports from
nspcc-dev/neofs-contract#507. Simplify processor's
logic. Do not use a separate "bank" account, transfer directly from container
owner to storage nodes instead. Pay for exact reported values, do not calculate
size estimations. Closes #3053.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept container estimations via contract method

2 participants