Eos: assertion failed: unable to find key

Created on 16 May 2018  路  14Comments  路  Source: EOSIO/eos

when I set the contract of eosio.system failed, eos-dawn-v4.0.0

> ./cleos set contract eosio ../../contracts/eosio.system -p eosio
Reading WAST/WASM from ../../contracts/eosio.system/eosio.system.wasm...
Using already assembled WASM...
Publishing contract...
2820266ms thread-0   main.cpp:2316                 main                 ] Failed with error: Assert Exception (10)
condition: assertion failed: unable to find key

Most helpful comment

Also the CORE token symbol must match the one nodeos has been compiled with.
Default is SYS so the eosio.token line must be:

cleos push action eosio.token create '["eosio", "10000000000.0000 SYS"]' -p eosio.token

All 14 comments

+1, same problem

+1锛宻ame problem too

1../cleos set contract eosio ../../contracts/eosio.token -p eosio

  1. push action eosio.token create '["eosio", "10000000000.0000 EOS",0,0,0]' -p eosio.token
  2. push action eosio.token issue '["eosio","1000000000.0000 EOS", "issue"]' -p eosio.token
  3. set contract eosio ../../contracts/eosio.system -p eosio

it is worked, but first time response is

Error 3080006: transaction took too long
Error Details:
deadline exceeded

the second time is success.

  1. create eosio.token account
  2. eosio.token contract should be set first then create EOS tokens & issue tokens
  3. set eosio.system contract

Edit - I think I managed to get past this. It was the order of the operations as well as using an account incorrectly in the steps below. This sequence indeed works:

cleos create account eosio eosio.token EOS8XYmXRzTFG2LboHQiT1Y48ZZyGmg6eYzxMUjf8SFzXAZXwyTqK
cleos set contract eosio.token /contracts/eosio.token
cleos push action eosio.token create '[eosio, "1000000000.0000 EOS"]' -p eosio.token
cleos push action eosio.token issue '[eosio, "1000000000.0000 EOS"]' -p eosio
cleos set contract eosio /contracts/eosio.system -p eosio

Original

I'm running into this too (using DAWN-2018-05-16) - and have followed the steps outlined above a couple times now while restarting the chain each time.

cleos create account eosio eosio.token EOS8XYmXRzTFG2LboHQiT1Y48ZZyGmg6eYzxMUjf8SFzXAZXwyTqK
cleos set contract eosio /contracts/eosio.token -p eosio
cleos push action eosio.token create '["eosio", "10000000000.0000 EOS", 0, 0, 0]' -p eosio.token
cleos push action eosio.token issue '["eosio","1000000000.0000 EOS", "issue"]' -p eosio.token
cleos set contract eosio /contracts/eosio.system -p eosio

As soon as I set the eosio.system contract it it returns the unknown key error:

> cleos set contract eosio /contracts/eosio.system -p eosio
Reading WAST/WASM from /contracts/eosio.system/eosio.system.wasm...
Using already assembled WASM...
Publishing contract...
425560ms thread-0   main.cpp:2444                 main                 ] Failed with error: Assert Exception (10)
condition: assertion failed: unable to find key

Got the same error.

@dboyzhong I followed your step but still meet 'unable to find key' assertion.

systemAccounts = [
    'eosio.bpay',
    'eosio.msig',
    'eosio.names',
    'eosio.ram',
    'eosio.ramfee',
    'eosio.saving',
    'eosio.stake',
    'eosio.token',
    'eosio.vpay',
]

This accounts needs to be created before installing eosio.system contract

Also the CORE token symbol must match the one nodeos has been compiled with.
Default is SYS so the eosio.token line must be:

cleos push action eosio.token create '["eosio", "10000000000.0000 SYS"]' -p eosio.token

@elmato Thanks!
Building the software using eosio_build.sh script, which parameter we should pass? If we need to use other symbol.

-DCORE_SYMBOL_NAME=XXX

-DCORE_SYMBOL_NAME=XXX didn't work for eosio_build.sh, do I need to edit the cmake file?

3586

Was this page helpful?
0 / 5 - 0 ratings