Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Exceeding CPU limit when pushing eosio.system contract #8289

@krotkiewicz

Description

@krotkiewicz

Hey,
when I run custom testnet nodeos with custom genesis file, I randomly get below error when pushing eosio.system contract.

$ cleos set contract eosio /tmp/eosio.contracts/build/contracts/eosio.system/
Reading WASM from /tmp/eosio.contracts/build/contracts/eosio.system/eosio.system.wasm...
Publishing contract...
error 2019-12-07T13:03:09.462 nodeos    http_plugin.cpp:652           handle_exception     ] FC Exception encountered while processing chain.push_transaction
Error 3080004: Transaction exceeded the current CPU usage limit imposed on the transaction

I use eos 1.8.5 from eostudio/eos:v1.8.5 docker image and eosio.contracts from release/1.8.x branch plus following genesis and config files:

{
  "initial_timestamp": "2018-03-02T12:00:00.000",
  "initial_key": "EOS55oVd4ZyC2QMiAMzs1WFYzEYU1GKAAALPCa45Dzs9wrUWo3hjD",
  "initial_configuration": {
    "max_block_net_usage": 1048576,
    "target_block_net_usage_pct": 1000,
    "max_transaction_net_usage": 524288,
    "base_per_transaction_net_usage": 12,
    "net_usage_leeway": 500,
    "context_free_discount_net_usage_num": 20,
    "context_free_discount_net_usage_den": 100,
    "max_block_cpu_usage": 100000,
    "target_block_cpu_usage_pct": 500,
    "max_transaction_cpu_usage": 50000,
    "min_transaction_cpu_usage": 100,
    "max_transaction_lifetime": 3600,
    "deferred_trx_expiration_window": 600,
    "max_transaction_delay": 3888000,
    "max_inline_action_size": 4096,
    "max_inline_action_depth": 4,
    "max_authority_depth": 6
  }
}
chain-state-db-size-mb = 65536
reversible-blocks-db-size-mb = 65536

producer-name = eosio
http-server-address = 0.0.0.0:8888

plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::http_plugin
plugin = eosio::producer_plugin
plugin = eosio::producer_api_plugin

access-control-allow-origin = *
http-validate-host = false
enable-stale-production = true
max-transaction-time = 3000000

filter-on = *

To easily reproduce it I prepared a repo with Dockerfile: https://github.com/ulamlabs/eos-regtest.
Just build the image and run it couple of times.

What I tried?

Increasing max CPU time in genesis file - then the pushing the system contract takes seconds and errors with Please increase the expiration time of your transaction!.

Thanks for helping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions