Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas used by tx increases sharply for accounts owning a large number of tokens #1851

Closed
shilei-wang opened this issue Aug 1, 2019 · 3 comments
Assignees
Labels

Comments

@shilei-wang
Copy link
Contributor

Describe the bug
Not sure if it is a bug , but maybe we need to pay attention to it.

It is observed that ALL TXs signed by this user will consume large amounts of Gas .

To Reproduce

for example:
if the user owns only IRIS, one delegate TX consumes him 16000 gas.

if the user owns mays 30 kinds of assets, one delegate TX consumes him 107213 gas.


echo 1234567890 | iriscli stake delegate --address-validator=fva1gzkaggvw6gguendvq4tz0wn6hkkauynardljrm --amount=5iris --fee=0.004iris --commit  --from=v1  --chain-id=shilei-qa --gas=150000 --fee=31iris
Committed at block 400 (tx hash: B62E04C42B370120D308A6E8DB8C8CCEE0584B0E7DAF49C5D5AFA4F606726D1A, response:
 {
   "code": 0,
   "data": null,
   "log": "Msg 0: ",
   "info": "",
   "gas_wanted": 150000,
   "gas_used": 107213,
   "codespace": "",
   "tags": [
     {
       "key": "action",
       "value": "delegate"
     },
     {
       "key": "delegator",
       "value": "faa1gzkaggvw6gguendvq4tz0wn6hkkauynaku4a7u"
     },
     {
       "key": "destination-validator",
       "value": "fva1gzkaggvw6gguendvq4tz0wn6hkkauynardljrm"
     }
   ]
 })
@haifengxi haifengxi changed the title The gas-used for TX increases sharply when the account owns different types of asset! Gas used by tx increases sharply for accounts owning a large number of tokens Aug 8, 2019
@shilei-wang
Copy link
Contributor Author

tokens send issue-token
1 : 3859 5238
20: 4004 5498
100: 4084 5679

@shilei-wang
Copy link
Contributor Author

gasLog = 1.08
send issue-token delegate
1 : 3890 5682 5538
20: 4071 6004 6908
100: 4169 6224 7077

gasLog = 1.05
send issue-token delegate
1 : 4222 6991 6921
20: 4520 7511 8934
100: 4675 7857 9187

gasLog = 1.03
send issue-token delegate
1 : 4809 9328 9407
20: 5312 10180 12497
100: 5567 10757 12928

@shilei-wang
Copy link
Contributor Author

gasLog = 1.01
send issue-token delegate
1 : 7758 9328 21729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants