adm: Use ContractStorageReader for reading methods #1009
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1009
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:fix/ape_read_withot_wallet"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since
ContractStorageReader
was introduced, reader method likeget-admin
andlist-rule-chains
should use it. This allows to use methods without wallets@ -97,2 +95,3 @@
var w *wallet.Wallet
committeeAcc, err := helper.GetWalletAccount(wallets[0], constants.CommitteeAccountName)
walletPath := viper.GetString(commonflags.AlphabetWalletsFlag)
We can have config file which contains endpoint in wallets.
I would rather provide an explicit option here or even split
newPolicyContractInterface()
into, the first one is called from read methods, and the second one (current) is called from other places.I have introduced
newPolicyContractReaderInterface
and used it forget-admin
andlist-targets
@ -99,0 +104,4 @@
// TODO (aarifullin): this workaround that creates a dummy wallet is used to create
// Actor without alpabet wallet. It is necessary to get rid of this workaround
// when ContractStorageReader will be introduced in policy engine.
w = wallet.NewInMemoryWallet()
we can just use
wallet.NewAccount()
and usecommitteeAcc, err = helper.GetWalletAccount(w, constants.CommitteeAccountName)
only inside the first branchFixed
NNS
contract #981adm: Make workarount for get-admin and list-rule-chainsto adm: Make workaround for get-admin and list-rule-chainse743e65d2c
to7d5d11a2a8
7d5d11a2a8
to2fa24dfcda
2fa24dfcda
toafccd2dfc8
adm: Make workaround for get-admin and list-rule-chainsto adm: Use ContractStorageReader for reading methodsListTargets
command infrostfs-adm
#1030