Netmap contract update routine #11
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-contract#11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
All FrostFS contracts aside netmap have simple update routine which is defined in
if isUpdate
branch of_deploy
function.Netmap contract have mandatory system config update and it requires specific arguments format for update function.
4f3c08f552/netmap/netmap_contract.go (L74-L93)
It looks to me as outdated code and it would be nice to have more flexibility in update arguments format for netmap contract. So my propose is to move
if isUpdate
branch before argument parsing andsetConfig
call.Do you meant having different formats for
deploy
andupdate
?Yes. I mean other contracts do not share arguments between
deploy
andupdate
methods, which seems legit. So it is may looks confusing when netmap contract requires a set of key:value pairs to update contract.I don't remember was it intentional or not, so there can be useful cases for such
update
behaviour.I think it was there because some time ago we updated netmap contract and then just deleted the update code.