Revise MorphRuleChainStorage interface and introduce ContractStorageReader #54

Merged
fyrchik merged 2 commits from aarifullin/policy-engine:feat/contract_storage_reader into master 2024-03-01 08:05:26 +00:00
Member
  • Split MorphRuleChainStorage interface by moving read-only methods to a separate interface MorphRuleChainStorageReader.
  • Implement MorphRuleChainStorageReader interface to make possible to read from Policy contract without wallets.
* Split MorphRuleChainStorage interface by moving read-only methods to a separate interface MorphRuleChainStorageReader. * Implement MorphRuleChainStorageReader interface to make possible to read from Policy contract without wallets.
aarifullin changed title from WIP: Revise MorphRuleChainStorage interface and introduce ContractStorageReader to Revise MorphRuleChainStorage interface and introduce ContractStorageReader 2024-02-26 15:52:02 +00:00
aarifullin force-pushed feat/contract_storage_reader from 822691ec50 to 33585fa7ca 2024-02-26 15:52:59 +00:00 Compare
aarifullin requested review from storage-core-committers 2024-02-26 15:53:11 +00:00
aarifullin requested review from storage-core-developers 2024-02-26 15:53:11 +00:00
aarifullin requested review from storage-services-committers 2024-02-26 15:53:15 +00:00
aarifullin requested review from storage-services-developers 2024-02-26 15:53:16 +00:00
aarifullin changed title from Revise MorphRuleChainStorage interface and introduce ContractStorageReader to WIP: Revise MorphRuleChainStorage interface and introduce ContractStorageReader 2024-02-26 15:54:56 +00:00
Owner

How about just implementing unwrappers here?
So we will use auto-generated bindings in node, and call unwrap.ListOfChains on the result.
This reduces the number of wrappers we have.

EDIT: nvm, wrappers are still useful for the types we accept.

How about just implementing unwrappers here? So we will use auto-generated bindings in node, and call `unwrap.ListOfChains` on the result. This reduces the number of wrappers we have. EDIT: nvm, wrappers are still useful for the types we accept.
Member

Should we use new MorphRuleChainStorageReader in router and maybe in Engine then?
It seems they use read only methods

Should we use new `MorphRuleChainStorageReader` in [router](https://git.frostfs.info/aarifullin/policy-engine/src/commit/33585fa7caf7c02b2639d2abd1d4fd804e4662f0/pkg/engine/chain_router.go) and maybe in `Engine` then? It seems they use read only methods
Owner

Why is it WIP?

Why is it WIP?
aarifullin changed title from WIP: Revise MorphRuleChainStorage interface and introduce ContractStorageReader to Revise MorphRuleChainStorage interface and introduce ContractStorageReader 2024-02-29 10:32:28 +00:00
Author
Member

Should we use new MorphRuleChainStorageReader in router and maybe in Engine then?
It seems they use read only methods

maybe in Engine

Engine should be able to change its state by adding/removing rules. So, only router should use ...Reader

> Should we use new `MorphRuleChainStorageReader` in [router](https://git.frostfs.info/aarifullin/policy-engine/src/commit/33585fa7caf7c02b2639d2abd1d4fd804e4662f0/pkg/engine/chain_router.go) and maybe in `Engine` then? > It seems they use read only methods > maybe in `Engine` `Engine` should be able to change its state by adding/removing rules. So, only router should use `...Reader`
aarifullin force-pushed feat/contract_storage_reader from 33585fa7ca to 4154899cff 2024-02-29 10:57:33 +00:00 Compare
dkirillov approved these changes 2024-03-01 07:25:18 +00:00
fyrchik approved these changes 2024-03-01 08:05:03 +00:00
fyrchik merged commit cf1f091e26 into master 2024-03-01 08:05:26 +00:00
Sign in to join this conversation.
No description provided.