[#128] IR: Do not try to emit GAS to nobody #151

Merged
fyrchik merged 1 commits from carpawell/frostfs-node:fix/not-send-gas-to-nobody into master 2023-03-21 08:59:47 +00:00
Collaborator

Fix sending GAS to an empty extra wallets receivers list. Also, send GAS to
extra wallets even if netmap is empty.

Signed-off-by: Pavel Karpy p.karpy@yadro.com

Saw

2023-03-20T16:43:02.447Z        warn    alphabet/process_emit.go:89     can't transfer gas to wallet    {"receivers": [], "amount": 250000000, "error": "at least one transfer parameter required"}

in logs.

Fix sending GAS to an empty extra wallets receivers list. Also, send GAS to extra wallets even if netmap is empty. Signed-off-by: Pavel Karpy <p.karpy@yadro.com> Saw ``` 2023-03-20T16:43:02.447Z warn alphabet/process_emit.go:89 can't transfer gas to wallet {"receivers": [], "amount": 250000000, "error": "at least one transfer parameter required"} ``` in logs.
carpawell self-assigned this 2023-03-20 17:00:13 +00:00
carpawell requested review from storage-core-committers 2023-03-20 17:00:37 +00:00
carpawell requested review from storage-core-developers 2023-03-20 17:00:37 +00:00
carpawell requested review from ironbee 2023-03-20 17:00:41 +00:00
ironbee reviewed 2023-03-20 17:35:06 +00:00
@ -72,2 +87,3 @@
}
err = ap.morphClient.TransferGas(key.GetScriptHash(), gasPerNode)
if extraLen != 0 {

I had this condition initially but lost it in transition to batch processing. 👽

I had this condition initially but lost it in transition to batch processing. 👽
ironbee approved these changes 2023-03-20 17:35:09 +00:00
acid-ant approved these changes 2023-03-20 17:47:23 +00:00
fyrchik reviewed 2023-03-21 07:30:17 +00:00
@ -71,1 +83,4 @@
}
}
} else {
ap.log.Debug("gas emission: empty network map")

Can we use 1 log message like Debug("gas emission", zap.Int("network_map", nmLen), zap.Int("extra", extraLen)) instead on 3 (2 in else and 1 if both are 0).

Can we use 1 log message like `Debug("gas emission", zap.Int("network_map", nmLen), zap.Int("extra", extraLen))` instead on 3 (2 in `else` and 1 if both are 0).
Poster
Collaborator

fixed

fixed
Poster
Collaborator

fixed

fixed
fyrchik added the due date 2023-03-21 2023-03-21 07:30:43 +00:00
carpawell force-pushed fix/not-send-gas-to-nobody from 72139974f4 to 32f95d5eee 2023-03-21 07:51:40 +00:00 Compare
carpawell requested review from fyrchik 2023-03-21 07:52:15 +00:00
carpawell force-pushed fix/not-send-gas-to-nobody from 32f95d5eee to 8243ac6307 2023-03-21 07:54:11 +00:00 Compare
fyrchik approved these changes 2023-03-21 08:59:42 +00:00
fyrchik merged commit 9a4f40626c into master 2023-03-21 08:59:47 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2023-03-21

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#151
There is no content yet.