tezos-reward-distributor-organization / tezos-reward-distributor

Tezos Reward Distributor (TRD): A reward distribution software for tezos bakers.
https://tezos-reward-distributor-organization.github.io/tezos-reward-distributor/
GNU General Public License v3.0
87 stars 51 forks source link

Set gas limit for tz1-to-tz1 transactions to 1001 #646

Closed denver-s closed 1 year ago

denver-s commented 1 year ago

name: Change gas limit for tz1 to tz1 transactions about: Minimum gas for a simple tz1 to tz1 transaction is 1001. labels:


IMPORTANT NOTICE: I read and understood the guidelines for contributions to the TRD. The contribution may qualify for being compensated by the TRD grant if approved by the maintainers.

In order to test the minimum gas required for such a transaction, one could run this command:

./octez-client transfer 1 from tz1_acc_1 to tz1_acc_2 --dry-run --gas-limit 1001

And verify that it works. Then, one could check that 1000 is too low:

./octez-client transfer 1 from tz1_acc_1 to tz1_acc_2 --dry-run --gas-limit 1000

Node is bootstrapped.
Not enough gas to deserialize the operation.
Injecting such a transaction could have you banned from mempools.
Gas limit exceeded during typechecking or execution.
Try again with a higher gas limit.

A random example from a real transaction: https://tzkt.io/onoT7ARjiyx45nfCNiQkRPyH7CPSwdQtvrGpXJmyXwyEPzM3Fwe/88049298

Work effort: 0.5 h

jdsika commented 1 year ago

Please give the source for this

denver-s commented 1 year ago

Please give the source for this

I added a test and and a real-case example.

jdsika commented 1 year ago

I cannot see the test. Maybe you forgot to push? Also please state the effort in hours, thanks :)

denver-s commented 1 year ago

Sorry, the test is described in the PR description. It's not a CI test. p.s. It's just a small contribution 🙂

jdsika commented 1 year ago

hm... ok. Can you try your next payouts with this setting and report if it worked? (just paranoid)

denver-s commented 1 year ago

It's been working fine (see here) since Kathmandu upgrade.

denver-s commented 1 year ago

FYI: tz1-to-tz1 transactions consume 1000040 milligas, but it is simplified to 1000 gas on the explorers. That's the reason for the choice of 1001 and not 1000.

dansan566 commented 1 year ago

We did two payouts on this branch - worked!