I have installed EOS using this - https://eosio-nodeos.readme.io/docs/docker-quickstart
docker pull eosio/eos-dev
And start the EOSIO node:
docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console --http-validate-host=false"
I am now using the API reference here - https://developers.eos.io/eosio-nodeos/reference
This works -
curl --request POST --url http://127.0.0.1:8888/v1/chain/get_info
Giving (after running twice) -
{ "server_version": "4f4e5c22", "chain_id": "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f", "head_block_num": 1133, "last_irreversible_block_num": 1132, "last_irreversible_block_id": "0000046c539765f73086b65cfb453fffb59b88130097064816e2b622cb1a7422", "head_block_id": "0000046d224758649572aec799adb313868a4fcbea3536c092e0645a33137545", "head_block_time": "2018-08-13T08:43:35.500", "head_block_producer": "eosio", "virtual_block_cpu_limit": 619663, "virtual_block_net_limit": 3253337, "block_cpu_limit": 199900, "block_net_limit": 1048576 } { "server_version": "4f4e5c22", "chain_id": "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f", "head_block_num": 1854, "last_irreversible_block_num": 1853, "last_irreversible_block_id": "0000073d66c1581cd561d92a80c90aff17f9e46adfaf45ba4f08b94a4aab5b0b", "head_block_id": "0000073edb76b2f92f995364f497899691c2f05171e68ef1b1bdff14a534b168", "head_block_time": "2018-08-13T08:49:36.000", "head_block_producer": "eosio", "virtual_block_cpu_limit": 1274266, "virtual_block_net_limit": 6692339, "block_cpu_limit": 199900, "block_net_limit": 1048576 }
When I try
curl --request POST --url http://127.0.0.1:8888/v1/chain/get_block
{ "code": 500, "message": "Internal Service Error", "error": { "code": 3010008, "name": "block_id_type_exception", "what": "Invalid block ID", "details": [] } }
It seems the EOS single node chain is running. But this basic command fails. I understood eosio was installed automatically as an account.
What could be the cause of this error? Do I need to define an account manually for eosio?