0

I am trying running nodeos with Mongo Db Plugin. Following is my nodeos:

nodeos \
--signature-provider Pubkey=KEY:PrivKey\
--plugin eosio::producer_plugin \
--plugin eosio::producer_api_plugin \
--plugin eosio::chain_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::http_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::history_plugin \
--plugin eosio::mongo_db_plugin \
--abi-serializer-max-time-ms=5000 \
--mongodb-uri=mongodb://127.0.0.1:27017/EOS \
--mongodb-wipe --hard-replay-blockchain \
--data-dir $DATADIR"/data" \
--blocks-dir $DATADIR"/blocks" \
--config-dir $DATADIR"/config" \
--producer-name eosio \
--http-server-address 127.0.0.1:8888 \
--p2p-listen-endpoint 127.0.0.1:9010 \
--access-control-allow-origin='*' \
--contracts-console \
--http-validate-host=false \
--verbose-http-errors \
--enable-stale-production \
--p2p-peer-address localhost:9011 \
--p2p-peer-address localhost:9012 \
--p2p-peer-address localhost:9013 \
>> $DATADIR"/nodeos.log" 2>&1 & \
echo $! > $DATADIR"/eosd.pid"

nodeos data is getting save in mongodb. But I cannot find block number one. I tried to get using:

db.blocks.find({"block_num":1}).pretty()

It returned nothing. Using cleos get block 1 I am getting the result. Can anybody please tell me why this is so?

1

It's due to the design of eosio. You can find the related information from here.

https://github.com/EOSIO/eos/pull/7690

1
  • Thank you for the asnwer!
    – Varsh
    Jul 13 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.