Closed luqz closed 5 years ago
21000 is the base gas of a tx.
Is the 0x1072fd65138cf36cd5d3e77661c1138e475ebf4d
a contract address? and the what's the data?
21000 is the base gas of a tx. Is the
0x1072fd65138cf36cd5d3e77661c1138e475ebf4d
a contract address? and the what's the data?
It's not a contract address. The data is just for test, it‘s meaningless, maybe something to record。
It's not a contract address.
Then it's normal for CITA for now. It's a tx with the data that will not be executed. so it will cost the base gas no matter how long the data is.
But i thinkg it's not a normal situation, either.
I remember there's an EIP about this. wait a minute
I will add some descriptions about this later.
CITA executes txs after consensus, while ethereum executes txs before consensus. This tx can not be executed successful on ethereum, so it will not be included in block. while, for cita, it will be included in block even though it's failed. It's the difference, the base quota/gas is ok for ethreum, but it's a problem for cita.
Maybe we need a way to calculate the tx data size. @jerry-yu @leeyr338 @ouwenkg
~I will add some descriptions about this later.~
CITA executes txs after consensus, while ethereum executes txs before consensus. This tx can not be executed successful on ethereum, so it will not be included in block. while, for cita, it will be included in block even though it's failed. It's the difference, the base quota/gas is ok for ethreum, but it's a problem for cita.
Maybe we need a way to calculate the tx data size. @jerry-yu @leeyr338 @ouwenkg
It's a uncompatible change, maybe later in a new version upgrade.
It's a uncompatible change, maybe later in a new version upgrade.
Actually, we can only calculate the data of failed tx. then it's not a uncompatible change.
// gas_prepare = 21000 + (68 or 4 per byte) + (32000 if tx.to == 0)
Be triggerd by protocol version 3
Description
cost same quota when send a transaction with data or not, even the data is very big
Steps to Reproduce
Expected behavior: quotaUsed is different by tx.data.length
Actual behavior: quotaUsed always 21000
Reproduce how often: every time
Versions
v0.25.0
Additional Information
I think this behavior need be change soon.