Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How much data can be contained in Ethernet Square intelligent contract transactions?

Shulou Source: shulou.com Published: 2022-06-01 02:22:46 10月03日 Update

This article introduces the relevant knowledge of "how much data can be contained in the intelligent contract transaction in Ethernet Square". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In theory, there is no direct or fixed upper limit on transaction size or block size in ethernet, which is also an advantage of ethernet.

However, this does not mean that there is no upper limit on the amount of data a transaction can carry, because there is an upper limit on the amount of gas that a block can use. At the time of writing this article, ethstats shows that the value is 7, 984, 452, about 7 million.

So, in theory, we can create a transaction that consumes all the gas that a block can use, which determines the maximum amount of data a transaction can theoretically contain.

Another factor determining the size of the data is the content of the data, because different data consumes different gas:

0 bytes consume 4 gas

Non-zero bytes consume 68 gas

21000 gas paid per transaction

Using the gas upper limit of the block, combined with the content of your data, you can calculate the size of data that can be sent by a transaction.

You can try sending random data from 256kb using mist:

This consumes about 9 million gas,mist and will attempt to create a deal, but will not succeed.

Let's try to approach the upper limit of the block gas, this time using 44444 random bytes:

This transaction can be successful, you can click here to view the transaction data.

Value: 60 Finney (0.06 Ether)

Gas: 3131800

Gas Price: 50 Gwei (0.00000005 Ether)

Gas Used By Transaction: 3031800

Actual Transaction Cost: 151.59 Finney (0.15159 Ether)

Cumulative Gas Used: 3031800

You see, we successfully wrote 44k bytes of data on block 967163.

This is the end of the content of "how much data can be contained in Ethernet Square Intelligent contract Trading". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Data trading upper limit size consumption Ethernet content bytes success theory contract intelligence difference more knowledge practicality success next advantage factor Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Shulou Information OPPO Reno Xiaomi