{"action":"created","issue":{"url":"https://api.github.com/repos/bcoin-org/bcoin/issues/615","repository_url":"https://api.github.com/repos/bcoin-org/bcoin","labels_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/615/labels{/name}","comments_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/615/comments","events_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/615/events","html_url":"https://github.com/bcoin-org/bcoin/issues/615","id":366949464,"node_id":"MDU6SXNzdWUzNjY5NDk0NjQ=","number":615,"title":"Bcoin mempool calculating wrong value for bytes","user":{"login":"revofever","id":8880715,"node_id":"MDQ6VXNlcjg4ODA3MTU=","avatar_url":"https://avatars1.githubusercontent.com/u/8880715?v=4","gravatar_id":"","url":"https://api.github.com/users/revofever","html_url":"https://github.com/revofever","followers_url":"https://api.github.com/users/revofever/followers","following_url":"https://api.github.com/users/revofever/following{/other_user}","gists_url":"https://api.github.com/users/revofever/gists{/gist_id}","starred_url":"https://api.github.com/users/revofever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revofever/subscriptions","organizations_url":"https://api.github.com/users/revofever/orgs","repos_url":"https://api.github.com/users/revofever/repos","events_url":"https://api.github.com/users/revofever/events{/privacy}","received_events_url":"https://api.github.com/users/revofever/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-04T20:06:15Z","updated_at":"2018-10-04T20:08:09Z","closed_at":null,"author_association":"NONE","body":"I'm running bcoin 1.0.2 and Bitcoin core 0.16.2. Both in the same datacenter with the same specs.\r\n\r\nWhen calling `getmempoolinfo` from both nodes, the bcoin value for bytes is always roughly 10x bigger than that of bitcoind, even if the number of txs is nearly the same. The bitcoind value matches all the mempool stats you find online, but bcoin is way off.\r\n\r\n<img width=\"701\" alt=\"screen shot 2018-10-04 at 1 13 24 pm\" src=\"https://user-images.githubusercontent.com/8880715/46499347-d89acb80-c7ed-11e8-8b89-ee0a656d3c6d.png\">\r\n\r\nSomething may be wrong with the calculation here.\r\n\r\nhttps://github.com/bcoin-org/bcoin/blob/master/lib/mempool/mempoolentry.js#L228-L291\r\n\r\nIt's also using the same function to return both bytes and usage. I thought these were suppose to be separate values.\r\n\r\nhttps://github.com/bcoin-org/bcoin/blob/e0863d4a918f09538bed85cf9a83928064525fc7/lib/node/rpc.js#L762-L769\r\n"},"comment":{"url":"https://api.github.com/repos/bcoin-org/bcoin/issues/comments/427152293","html_url":"https://github.com/bcoin-org/bcoin/issues/615#issuecomment-427152293","issue_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/615","id":427152293,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE1MjI5Mw==","user":{"login":"pinheadmz","id":2084648,"node_id":"MDQ6VXNlcjIwODQ2NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2084648?v=4","gravatar_id":"","url":"https://api.github.com/users/pinheadmz","html_url":"https://github.com/pinheadmz","followers_url":"https://api.github.com/users/pinheadmz/followers","following_url":"https://api.github.com/users/pinheadmz/following{/other_user}","gists_url":"https://api.github.com/users/pinheadmz/gists{/gist_id}","starred_url":"https://api.github.com/users/pinheadmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinheadmz/subscriptions","organizations_url":"https://api.github.com/users/pinheadmz/orgs","repos_url":"https://api.github.com/users/pinheadmz/repos","events_url":"https://api.github.com/users/pinheadmz/events{/privacy}","received_events_url":"https://api.github.com/users/pinheadmz/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T20:08:09Z","updated_at":"2018-10-04T20:08:09Z","author_association":"CONTRIBUTOR","body":"Thanks @revofever yeah it seems weird that for every _tx_ in mempool we'd be adding these constant values:\r\n```\r\n    total += 176; // mempool entry\r\n    total += 48; // coinbase\r\n    total += 48; // dependencies\r\n\r\n    total += 208; // tx\r\n    total += 80; // _hash\r\n    total += 88; // _hhash\r\n    total += 80; // _raw\r\n    total += 80; // _whash\r\n    total += 48; // mutable\r\n\r\n    total += 32; // input array\r\n```"}}
{"actor":{"display_login":"pinheadmz"}}