EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

Block-producing chain: how to increase tx net_limit & max_block_size ? #7112

Closed 7-of-9 closed 5 years ago

7-of-9 commented 5 years ago

Hi all,

I'm running a dApp on an side chain block producing instance of EOSIO 1.6. My dApp users are represented on the chain by separate accounts, governed/created by a master account.

All is working well, however some of the contract methods write relatively large amounts of data to the chain.

So, my question is: how can I increase the block_net_limit ? I'm also interested in increasing the default maximum block size, which I believe is 1 MB, but can't see any docs on how to go about this.

My creator/master account creates dApp user accoutns with delegatebw... stake_net_quantity: '0.001 SYS', stake_cpu_quantity: '0.001 SYS', howevercleos get account xxxxxx` shows that the created accounts (and the creator account) as follows:

`net bandwidth: used: unlimited available: unlimited limit: unlimited

cpu bandwidth: used: unlimited available: unlimited limit: unlimited`

I'm unclear how they are 'unlimited' (although that is fine, actually fits well), nonetheless, when trying to write a large amount of data to an indexed table through a contract method, nodeos reports:

3080002 tx_net_usage_exceeded: Transaction exceeded the current network usage limit imposed on the transaction transaction net usage is too high: 838889 > 524288

Any help or input is very much appreciated.

spoonincode commented 5 years ago

Take a look at the setparams action of either the bios or system contract. Ultimately an intrinsic call on set_blockchain_parameters_packed() has to be made from a privileged account; which the setparams action will do.

You can also set these values in the genesis json configuration on a new chain.

7-of-9 commented 5 years ago

Thanks @spoonincode - much appreciated; do you know if the setparams action can be called on an existing chain?

spoonincode commented 5 years ago

Yes, absolutely

7-of-9 commented 5 years ago

Many thanks @spoonincode! - will give this a try and update and/or close this issue with my findings.

spoonincode commented 5 years ago

You may also find the command cleos get table eosio eosio global useful as a way of seeing what the current parameters are.

7-of-9 commented 5 years ago

Hmm, I guess I'm missing something on my install. When I run cleos get table eosio eosio global I get this error:

Error 3060003: Contract Table Query Exception Most likely, the given table doesn't exist in the blockchain. Error Details: Table global is not specified in the ABI

I've installed the BIOS contract with cleos --wallet-url http://127.0.0.1:8899 -u http://0.0.0.0:8888 set contract eosio ~/eos/build/contracts/eosio.bios but still the "global" table isn't found.

spoonincode commented 5 years ago

I believe the global table is only provided by the eosio.system contract. The parameters are still there no matter what system contract is installed (like eosio.bios) but I'm not sure offhand how to view them. Were you able to successfully increase the limit?

7-of-9 commented 5 years ago

Hi @spoonincode -- no, was not able to do so; insufficient documentation.

Still on my list, but not a high enough priority at the moment. But I suspect it will come back to bite me and become a blocker: I'm using a public sidechain immutable data-storage, but this will probably quickly see concurrency issues impacted by the block size, as well as individual txs' max net consumption which are already even in dev limiting the data payload size.

spoonincode commented 5 years ago

Going to close this due to no activity; as far as we know these parameters operate correctly so please open an issue if you find problems