* Change `ChainRouter` interface: `IsAllow` should also receive
client defined overrides that are checked after local overrides
but before morph chains. Client defined overrides are checked for
per request.
* Fix code that uses `ChainRouter`.
* Fix unit-tests.
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
Make it possible to execute fuzz tests with different backend, such as
go-fuzz which supports coverage collection.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
* Make `ListMorphRuleChains` methods use `commonclient.ReadIteratorItems`.
* Introduce `ContractStorageActor` interface.
* Iterators are used because listing by `ListChainsByPrefix` may cause
stack overflow from neo-go side (len(items) > 1024).
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
* Update frostfs-contract package version in go.mod.
* Extend MorphRuleChainStorage interface with ListTargetsIterator and
introduce its implementation.
* Check targets in inmemory implementation unit-tests.
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
* Implement MorphRuleChainStorageReader interface to make
possible to read from Policy contract without wallets.
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
* Split MorphRuleChainStorage interface by moving read-only
methods to a separate interface MorphRuleChainStorageReader.
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
* It is not required to transform long names because
container chains will be added by container ID
but not by a resource name.
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
* Make changing state methods like AddMorphRuleChain,
RemoveMorphRuleChain return transaction hash and VUB.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
* Make LocalOverrideStorage methods to receive Target type
instead resource
* Refactor unit-tests and dependencies
* Make default chain router check local overrides not
only for container but also for namespaces
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>