Commit graph

27 commits

Author SHA1 Message Date
Evgenii Stratonikov
4f3c08f552 [#300] container: Allow to iterate over container list
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2023-01-16 14:40:21 +03:00
03bff785d2 [#293] container: Add IterateContainerSizes method
Add method that allows to iterate over estimation records.

Update tests to assert that list of estimations built with existing methods
is identical to estimations from iterator.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2023-01-16 14:40:21 +03:00
9c004cab2e [TrueCloudLab#3] container: Rename neofs to frostfs
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-11 17:19:35 +03:00
Evgenii Stratonikov
6c805c1b4e Move from nspcc-dev to TrueCloudLab
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-12-13 11:12:48 +03:00
Evgenii Stratonikov
5b5ff8cb33 [#261] nns: Set expiration time based on arguments
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-08-29 12:03:24 +03:00
Evgenii Stratonikov
f1f2101dc6 [#242] container: allow to fetch total amount of countainers
There are 2 approaches:
1. Use `storage.Find` to enumerate all containers.
2. Store a counter by a separate key.

Here we implemented 1, because this method is readonly (thus GAS cost it
not a problem) and simpler to implement.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-05-24 13:31:18 +03:00
Evgenii Stratonikov
a4f9d52cfc [#225] netmap: Rename Register to AddPeerIR
Similar to `UpdateState`/`UpdateStateIR` pair.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-17 16:32:20 +03:00
Evgenii Stratonikov
676daa1782 [#215] container: remove old estimations when adding new ones
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:39:30 +03:00
Evgenii Stratonikov
7bca6bf782 [#215] container/tests: add tests for container size estimation
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:39:30 +03:00
Evgenii Stratonikov
53f102344f [#215] container/tests: add helper for dummy container creation
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:39:30 +03:00
Alex Vanin
39fc2b8ac4 [#194] container: Fix tests
One can't register domain in advance when zone
owner is container contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-08 18:19:07 +03:00
Pavel Karpy
2ee2344e5f [#184] *: Move all panics on witness checks in common
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +03:00
Pavel Karpy
ac89694eeb [#184] *: Remove method prefix in panic messages
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +03:00
Evgenii Stratonikov
8553320e1c [#161] tests: reuse neo-go testing framework
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-15 18:13:24 +03:00
Evgenii Stratonikov
552def9322 [#139] nns: require admin signature for registering subdomain
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 14:00:28 +03:00
Evgenii Stratonikov
2cb10edfd2 [#142] container: do not fail when deleting missing container
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-25 18:10:47 +03:00
Evgenii Stratonikov
6bd088aa9f [#142] container: panic on missing container
Return more descriptive error message for a user.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-25 18:10:47 +03:00
Evgenii Stratonikov
654fc371fd [#142] tests: fix container owner offset
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-25 18:10:47 +03:00
Evgenii Stratonikov
8c8e4a6d85 [#156] container: fix domain owner check
Container contract owns all registered domains.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-22 09:08:13 +03:00
Evgenii Stratonikov
c957b9ca69 [#151] container: require additional fee for nice-name
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 13:11:53 +03:00
Evgenii Stratonikov
7fe7188e7d [#150] container: allow only alphabet calls in SetEACL
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
0ef906fb03 [#150] container: allow only alphabet calls in Delete
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
e5c5cc30c0 [#150] container: make config key public
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
fef6a6cb36 [#150] container: check domain owner in Put
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
16f3281198 [#150] tests: add container type in tests
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
a7601334f7 [#150] container: allow only alphabet calls in Put
For notary-enabled environment we expect `put` to be signed by alphabet.
Also group notary-disabled logic inside a single if and
add tests for balance checks.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00
Evgenii Stratonikov
cd005e54a4 [#135] tests: check container nice-name registration
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-07 12:25:19 +03:00