EOSEssentials / eos-node-watcher

Watch & Filter EOS Nodes Transactions/Actions and pushes to RabbitMQ, MongoDB, 0MQ etc.
MIT License
47 stars 9 forks source link

500 errors on certain blocks? #1

Closed joshpurvis closed 6 years ago

joshpurvis commented 6 years ago

First off, thanks for this -- mostly works great!

I realize that this might be an issue with the block producer, but I'm not completely sure.

17:38:25.038 INFO  Syncing block 17909067                                       
17:38:25.422 ERROR Sync failed on block 17909067 >>> Request failed with status code 500

If I bump .lastblock, it'll move on to the other blocks. If I check on an online block explorer they mostly look fine: https://www.bloks.io/block/17909067

~Curiously though, there's a transaction with zero actions.. could that be the issue? Is the code requesting details that wouldn't be there, and might return 500, if there were no actions?~ Actually, I don't think it's this.. the next block also has empty transactions and it loads fine.

joshpurvis commented 6 years ago

Some further debugging indicates it's a problem on the block producer's API

curl http://api.cypherglass.com/v1/history/get_transaction \
-X POST -d '{"id":"64ba8ed7e219677f8f780316a13ad2174d0df0f2f868e5028f89c24bd57b6915"}'

{"code":500,"message":"Internal Service Error","error":{"code":3040011,"name":"tx_not_found","what":"The transaction can not be found","details":[{"message":"Transaction 64ba8ed7e219677f8f780316a13ad2174d0df0f2f868e5028f89c24bd57b6915 not found in history and no block hint was given","file":"history_plugin.cpp","line_number":452,"method":"get_transaction"}]}}%                                              

curl http://api1.eosasia.one/v1/history/get_transaction \
-X POST -d '{"id":"64ba8ed7e219677f8f780316a13ad2174d0df0f2f868e5028f89c24bd57b6915"}'

{"id":"64ba8ed7e219677f8f780316a13ad2174d0df0f2f868e5028f89c24bd57b6915","trx":{"receipt":{"status":"executed","cpu_usage_us":830,"net_usage_words":13,"trx":[1,{"signatures":["SIG_K1_Jzn8zZrQD1iCrd2dWVfSjqjyzzrkHh3mtNyEA4aAWR8dz6m1getPka4uEVYzERadh1ZAyuTpPqda9A7WwxvwjsE15fEBz9"],"compression":"none","packed_context_free_data":"","packed_trx":"888dae5b448cdb0ddba700000000017055c64646d55d0d004046c8a86cd4450190a7a60819154de300000000a8ed32320890a7a60819154de300"}]},"trx":{"expiration":"2018-09-28T20:22:32","ref_block_num":35908,"ref_block_prefix":2816151003,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"1pixelmaster","name":"createacct","authorization":[{"actor":"whaleaccount","permission":"active"}],"data":{"account":"whaleaccount"},"hex_data":"90a7a60819154de3"}],"transaction_extensions":[],"signatures":["SIG_K1_Jzn8zZrQD1iCrd2dWVfSjqjyzzrkHh3mtNyEA4aAWR8dz6m1getPka4uEVYzERadh1ZAyuTpPqda9A7WwxvwjsE15fEBz9"],"context_free_data":[]}},"block_time":"2018-09-28T20:21:47.000","block_num":18845099,"last_irreversible_block":18869496,"traces":[{"receipt":{"receiver":"1pixelmaster","act_digest":"2730343958138386fc43bc70327cc5da4b84c4bfab2689f5b3fcadece1051217","global_sequence":484506739,"recv_sequence":140698,"auth_sequence":[["whaleaccount",2]],"code_sequence":19,"abi_sequence":11},"act":{"account":"1pixelmaster","name":"createacct","authorization":[{"actor":"whaleaccount","permission":"active"}],"data":{"account":"whaleaccount"},"hex_data":"90a7a60819154de3"},"context_free":false,"elapsed":254,"cpu_usage":0,"console":"","total_cpu_usage":0,"trx_id":"64ba8ed7e219677f8f780316a13ad2174d0df0f2f868e5028f89c24bd57b6915","block_num":18845099,"block_time":"2018-09-28T20:21:47.000","producer_block_id":"011f8dab9b04eda172c59f4abdb334cf231b8134cb6a6fd536cd835c4267b989","account_ram_deltas":[{"account":"whaleaccount","delta":160}],"inline_traces":[]}]}%                                                                                                                   

There's some further info in this issue: https://github.com/EOSIO/eosjs/issues/287#issuecomment-410788732

Feel free to close this issue, but if I have time I might open PR later to allow multiple history API urls for backup.

leordev commented 6 years ago

thanks @joshpurvis for the report.