adm/morph: Fix transfer GAS to alphabet nodes #1239
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 milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1239
Loading…
Reference in a new issue
No description provided.
Delete branch "achuprov/frostfs-node:bugfux/transfer_gas"
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?
Ref # TrueCloudLab/frostfs-dev-env#70
Signed-off-by: Alexander Chuprov a.chuprov@yadro.com
@ -81,3 +81,3 @@
r := nep17.NewReader(c.ReadOnlyInvoker, gas.Hash)
res, err := r.BalanceOf(acc.Contract.ScriptHash())
return res.Cmp(big.NewInt(initialAlphabetGASAmount/2)) == 1, err
return res.Cmp(big.NewInt(5*native.GASFactor)) == 1, err
It doesn't depend on the number of alphabet nodes (is that what we want?), how about
initialAlphabetGASAmount / 100500
?Anyway, where does
5
comes from?The
initialAlphabetGASAmount
is set asinitialAlphabetGASAmount = 10_000 * native.GASFactor
and does not depend on the number of alphabet nodes.The coefficient of
5
was obtained empirically.Please, move 5 to a constant with a comment about why it is as it is.
d52de747d9
to782b7dfbdb
782b7dfbdb
to08953a2f94