{"action":"created","issue":{"url":"https://api.github.com/repos/EOSIO/eos/issues/5339","repository_url":"https://api.github.com/repos/EOSIO/eos","labels_url":"https://api.github.com/repos/EOSIO/eos/issues/5339/labels{/name}","comments_url":"https://api.github.com/repos/EOSIO/eos/issues/5339/comments","events_url":"https://api.github.com/repos/EOSIO/eos/issues/5339/events","html_url":"https://github.com/EOSIO/eos/pull/5339","id":352271396,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NjI0MjI2","number":5339,"title":"Add block info & ram delta to action_trace","user":{"login":"heifner","id":3933649,"node_id":"MDQ6VXNlcjM5MzM2NDk=","avatar_url":"https://avatars3.githubusercontent.com/u/3933649?v=4","gravatar_id":"","url":"https://api.github.com/users/heifner","html_url":"https://github.com/heifner","followers_url":"https://api.github.com/users/heifner/followers","following_url":"https://api.github.com/users/heifner/following{/other_user}","gists_url":"https://api.github.com/users/heifner/gists{/gist_id}","starred_url":"https://api.github.com/users/heifner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heifner/subscriptions","organizations_url":"https://api.github.com/users/heifner/orgs","repos_url":"https://api.github.com/users/heifner/repos","events_url":"https://api.github.com/users/heifner/events{/privacy}","received_events_url":"https://api.github.com/users/heifner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-20T19:48:06Z","updated_at":"2018-09-10T12:32:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/EOSIO/eos/pulls/5339","html_url":"https://github.com/EOSIO/eos/pull/5339","diff_url":"https://github.com/EOSIO/eos/pull/5339.diff","patch_url":"https://github.com/EOSIO/eos/pull/5339.patch"},"body":"Resolves #5149 \r\n\r\naction_trace & transaction_trace changes:\r\n- Add block_num, block_time, producer_block_id to action_trace\r\n- Add block_num, block_time, producer_block_id to transaction_trace\r\n- Add ram_delta per account to action_trace\r\n\r\nmongo_db_plugin chnages:\r\n- Update block_state with irreversible=true on irreversible signal\r\n- Add transaction_trace status to each action_trace\r\n"},"comment":{"url":"https://api.github.com/repos/EOSIO/eos/issues/comments/419896222","html_url":"https://github.com/EOSIO/eos/pull/5339#issuecomment-419896222","issue_url":"https://api.github.com/repos/EOSIO/eos/issues/5339","id":419896222,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTg5NjIyMg==","user":{"login":"sim31","id":7878290,"node_id":"MDQ6VXNlcjc4NzgyOTA=","avatar_url":"https://avatars1.githubusercontent.com/u/7878290?v=4","gravatar_id":"","url":"https://api.github.com/users/sim31","html_url":"https://github.com/sim31","followers_url":"https://api.github.com/users/sim31/followers","following_url":"https://api.github.com/users/sim31/following{/other_user}","gists_url":"https://api.github.com/users/sim31/gists{/gist_id}","starred_url":"https://api.github.com/users/sim31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sim31/subscriptions","organizations_url":"https://api.github.com/users/sim31/orgs","repos_url":"https://api.github.com/users/sim31/repos","events_url":"https://api.github.com/users/sim31/events{/privacy}","received_events_url":"https://api.github.com/users/sim31/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T12:32:52Z","updated_at":"2018-09-10T12:32:52Z","author_association":"CONTRIBUTOR","body":"Say, I want to get all actions where account A payed for RAM. Now I have to query array of arrays for that. I've tried in ways, which seemed straightforward to me first - they didn't work. I had to dig around on the internet to find out [how to do that](https://stackoverflow.com/questions/12629692/querying-an-array-of-arrays-in-mongodb), but that's not the problem. The problem is that I've found in multiple places where people say that that's a bad document structure and there will be problems when trying to do aggregation for example. [Here for example](https://stackoverflow.com/questions/41938095/is-there-a-way-to-query-for-dict-of-arrays-of-array-in-mongodb).\r\n\r\nNow, let's say I want to create an index on the payer field, to make the query I mentioned above faster. Didn't have time to think about it much yet, but I have no idea how to do it for the current document structure. Would be straightforward if `account_ram_delta` would contain objects. Now I could only find [this](https://stackoverflow.com/questions/16363980/mongodb-array-of-arrays-index) so far, which again suggests that it's not the best document structure.\r\n\r\nI'm under impression mongodb expects objects to be used these kind of scenarios and it's probably optimized better if objects are used as well.\r\n"}}
{"actor":{"display_login":"sim31"}}