steem icon indicating copy to clipboard operation
steem copied to clipboard

implement get_transaction for rocks-ah

Open roadscape opened this issue 6 years ago • 11 comments

$ http -j post dev-ah-node jsonrpc=2.0 id=1 method=account_history_api.get_transaction params:='{"id":"36feddae5eb9efa309717d2af22e99814a8bd2e3"}'
{"jsonrpc":"2.0","error":{"code":-32003,"message":"Assert Exception:false: This API is not supported for account history backed by RocksDB","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"account_history_api.cpp","line":159,"method":"get_transaction","hostname":"","timestamp":"2018-04-03T18:06:19"},"format":"false: This API is not supported for account history backed by RocksDB","data":{}}]}},"id":"1"}

$ http -j post dev-ah-node jsonrpc=2.0 id=1 method=condenser_api.get_transaction params:='["36feddae5eb9efa309717d2af22e99814a8bd2e3"]'
{"jsonrpc":"2.0","error":{"code":-32003,"message":"Assert Exception:false: This API is not supported for account history backed by RocksDB","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"account_history_api.cpp","line":159,"method":"get_transaction","hostname":"","timestamp":"2018-04-03T18:02:43"},"format":"false: This API is not supported for account history backed by RocksDB","data":{}}]}},"id":"1"}

roadscape avatar Apr 04 '18 14:04 roadscape

get_transaction hasn't been enabled on our nodes for about 10 months now. I do not see a reason why we need to add it back with the RocksDB Account History.

mvandeberg avatar Apr 04 '18 15:04 mvandeberg

How else do you get the status of a transaction or find which block it's in?

Exchanges rely on this method through block explorers such as steemd.com; they use it to debug deposit/withdraw issues, and their users use these trx urls to file in support tickets.

Just because steemit.com doesn't use it doesn't mean it's worthless to everyone else...

roadscape avatar Apr 04 '18 15:04 roadscape

That is the discussion of #486

mvandeberg avatar Apr 04 '18 16:04 mvandeberg

Also, indexing transactions by id in SBDS should be trivial for long term lookup.

mvandeberg avatar Apr 04 '18 19:04 mvandeberg

I'm weighing in to state that I have uses for get_transaction and would rather not see that responsibility moved from steemd to SBDS. This method IMO belongs in the node software and not in a 2nd layer solution.

If this method is removed from the node itself, it would force any 3rd party apps using it to either:

  1. depend on the SBDS installation maintained by Steemit Inc.
  2. maintain their own SBDS installation on top of a steemd node (increasing their TCO).

aaroncox avatar Apr 04 '18 19:04 aaroncox

This can be added and done more efficiently than the existing account history plugin, but needs some dev time to do so. I've added this to our backlog.

mvandeberg avatar Apr 05 '18 19:04 mvandeberg

@mvandeberg I'm currently working on a game which would rely on get_transaction for efficient fetching of data. Using a 2nd layer method is not safe enough for our purposes.

I know that you guys are currently pretty booked out, so whenever you can put a focus on it - would be amazing!

therealwolf42 avatar Jun 11 '18 16:06 therealwolf42

@therealwolf42 Thanks for reaching out. This issue isn't an immediate priority, but we are planning on implementing it after we have HF20 finished.

youkaicountry avatar Jun 11 '18 17:06 youkaicountry

yet another developer here, which is sad because of lack of support for get_transaction :(

noisy avatar Aug 13 '18 00:08 noisy

This is a must for us to be able to verify transaction validity directly from blockchain nodes

pauliusuza avatar Aug 21 '18 10:08 pauliusuza

Has this been/will be addressed yet?

Jolly-Pirate avatar Jun 30 '19 14:06 Jolly-Pirate