CryptoLions / EOS-mongo-history-API

API to get actions using EOS mongo plugin (similar to history plugin)
MIT License
52 stars 24 forks source link

mongo_history_plugin has been deprecated !!!

API Documentation https://history.cryptolions.io

API url - https://history.cryptolions.io

add to your nodeos config.ini

plugin = eosio::mongo_db_plugin
mongodb-uri = mongodb://127.0.0.1:27017/EOS
mongodb-filter-on = *
#mongodb-filter-out = spammer::
mongodb-filter-out = eosio:onblock:
mongodb-filter-out = gu2tembqgage::
mongodb-filter-out = blocktwitter::
mongodb-queue-size = 2048
abi-serializer-max-time-ms = 5000
mongodb-block-start = 1
mongodb-store-block-states = false
mongodb-store-blocks = false
mongodb-store-transactions = false
mongodb-store-transaction-traces = true
mongodb-store-action-traces = true

read-mode = read-only

indexing fields for get_actions (collection - action_traces)

Use build_indexes.sh script to create indexes (the best is to run on start syncronisation)

mongo EOS --eval 'db.action_traces.createIndex({"act.account": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.name": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.data.receiver": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.data.from": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.data.to": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.data.name": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.data.voter": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"act.authorization.actor": 1, "createdAt":1},{background: true, sparse: true})'  
mongo EOS --eval 'db.action_traces.createIndex({"account_ram_deltas.account": 1, "createdAt":1},{background: true, sparse: true})'  

Other Indexes

mongo EOS --eval 'db.account_controls.createIndex({"controlling_account": 1},{background: true, sparse: true})'  
mongo EOS --eval 'db.pub_keys.createIndex({"public_key": 1},{background: true, sparse: true})'  
mongo EOS --eval 'db.accounts.createIndex({"name": 1},{background: true, sparse: true})'  

Change Log

v1.0.0:

v1.0.1:

v1.0.2:

v1.0.3: