Closed keisuke-kanao closed 6 years ago
you can try cleos set contract build/contracts/eosio eosio.system -x 1000
I tried below and got the same error: $ cleos set contract eosio build/contracts/eosio.system -x 1000 -p eosio
If I specified "-x 1000": $ cleos set contract eosio build/contracts/eosio.system -x 1000 -p eosio then, I go the exception log from nodeos, as follows:
1018257ms thread-0 chain_api_plugin.cpp:79 operator() ] Exception encountered while processing chain.push_transaction: 3080006 deadline_exception: transaction took too long deadline exceeded {"now":"2018-05-17T08:16:58.256","deadline":"2018-05-17T08:16:58.255","start":"2018-05-17T08:16:58.226"} thread-0 transaction_context.cpp:287 checktime {"_pending_console_output.str()":""} thread-0 apply_context.cpp:55 exec_one
The corresponding parts in apply_context.cpp are as follows:
void transaction_context::checktime()const { auto now = fc::time_point::now(); if( BOOST_UNLIKELY( now > _deadline ) ) { if( billed_cpu_time_us > 0 || deadline_exception_code == deadline_exception::code_value ) { EOS_THROW( deadline_exception, "deadline exceeded", ("now", now)("deadline", _deadline)("start", start) ); }
From the above, it seems to be natural that an exception occurred because of "now" > "deadline". I tested with a few other expiration value, all resulted in "now" > "deadline".
If I didn't specify an expiration value: $ cleos set contract eosio build/contracts/eosio.system -p eosio then, the exception log from nodeos was as follows:
1081742ms thread-0 chain_api_plugin.cpp:79 operator() ] Exception encountered while processing chain.push_transaction: 3080006 deadline_exception: transaction took too long deadline exceeded {"now":"2018-05-17T08:18:01.742","deadline":"2018-05-17T08:18:01.742","start":"2018-05-17T08:18:01.713"} thread-0 transaction_context.cpp:287 checktime
You try again like this cd eos/build make install then , cleos set contract eosio build/contracts/eosio.system -x 1000 -p eosio
I already did build and install processes with two PCs (one is Core i7 and another is Core i5, both have 8 GB of RAM), a few times each, all resulted in the same error. Howerver, maybe I will do that later again.
add this to config.ini max-transaction-time=1000
Thanks dfguo.
Under Dawn 4.1 and based on https://github.com/EOSIO/eos/wiki/Tutorial-Bios-Boot-Sequence, I did below successfully:
$ nodeos --max-transaction-time=1000 --resync $ cleos create key # for eosio.token $ cleos wallet import ... $ cleos create account eosio eosio.token ... $ cleos set contract eosio.token build/contracts/eosio.token $ cleos push action eosio.token create '[ "eosio", "10000000000.0000 SYS", 0, 0, 0]' -p eosio.token $ cleos push action eosio.token issue '[ "eosio", "1000000000.0000 SYS", "memo" ]' -p eosio $ cleos set contract eosio build/contracts/eosio.system Reading WAST/WASM from build/contracts/eosio.system/eosio.system.wasm... Using already assembled WASM... Publishing contract... executed transaction: 901b98f873d67a084ed8e6ea50453e474935e44865ffcef42289e8878198a9fa 40440 bytes 5248 us
thanks
Thank you! This solved "3080006: transaction took too long" which was happened too frequent for me.
Not familiar with restart process I had to build a new docker container though. The trick is in the last parameter "--max-transaction-time=1000"
docker run --name eosio \ --publish 7777:7777 \ --publish 127.0.0.1:5555:5555 \ --volume /Users/Venomancer/Documents/docker/contracts:/Users/Venomancer/Documents/docker/contracts \ --detach \ eosio/eos \ /bin/bash -c \ "keosd --http-server-address=0.0.0.0:5555 & exec nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:7777 --access-control-allow-origin= --contracts-console --http-validate-host=false --filter-on='' --max-transaction-time=1000"
I set
--max-transaction-time=1000
still getting same issue. Any other alternative?
I set
--max-transaction-time=1000
still getting same issue. Any other alternative?
Sorry no comment on this any more. The EOS core update breaks back-compatibility and I don't follow closely now.
Although this issue was closed in #2977, I still have the same issue under Dawn 4.0. First, regarding "-x, --expiration" option, I confirmed this works with:
But with this option, "contract eosio build/contracts/eosio.system ..." still failed, as below:
So I don't think the transaction time is the main cause of this issue.
I tried other variations of "cleos set contract ..." as below, that indicated another error:
Please let me know what exactly I should to to solve this issue.