{"action":"created","issue":{"url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/308","labels_url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/308/comments","events_url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/308/events","html_url":"https://github.com/chris-belcher/joinmarket/issues/308","id":115498228,"number":308,"title":"Estimating fees","user":{"login":"AdamISZ","id":4278257,"avatar_url":"https://avatars.githubusercontent.com/u/4278257?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamISZ","html_url":"https://github.com/AdamISZ","followers_url":"https://api.github.com/users/AdamISZ/followers","following_url":"https://api.github.com/users/AdamISZ/following{/other_user}","gists_url":"https://api.github.com/users/AdamISZ/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamISZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamISZ/subscriptions","organizations_url":"https://api.github.com/users/AdamISZ/orgs","repos_url":"https://api.github.com/users/AdamISZ/repos","events_url":"https://api.github.com/users/AdamISZ/events{/privacy}","received_events_url":"https://api.github.com/users/AdamISZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-06T12:45:25Z","updated_at":"2015-11-06T16:46:30Z","closed_at":null,"body":"Based on the discussion here: https://www.reddit.com/r/joinmarket/comments/3rm656/is_making_transactions_jm_in_these_days_of/\r\n\r\nI'm putting together a PR to, optionally, calculate a fee estimate for fast/default/slow at the point when all the maker utxos have been received and we build the tx. It's based on this: \r\n\r\n    #Estimate fee per choice of 'fast','medium','patient'\r\n    #Assuming p2pkh:\r\n    #out: 8+1+3+2+20=34, in: 1+32+4+1+1+~73+1+1+33=147, ver:4,seq:4, +2 (len in,out)\r\n    #total ~= 34*len_out + 147*len_in + 10 (sig sizes vary slightly)\r\n\r\nObviously there are several issues. First, if the change amount that gets calculated from this is less than the dust limit, the attempt would have to be abandoned. Second, I guess it can't be applied to a sweep. Third, having it optionally fail like that I guess would not work for a tumbler (well, not directly). Anyway putting it together and testing, and then see if we can refine it."},"comment":{"url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/comments/154467873","html_url":"https://github.com/chris-belcher/joinmarket/issues/308#issuecomment-154467873","issue_url":"https://api.github.com/repos/chris-belcher/joinmarket/issues/308","id":154467873,"user":{"login":"chris-belcher","id":8398185,"avatar_url":"https://avatars.githubusercontent.com/u/8398185?v=3","gravatar_id":"","url":"https://api.github.com/users/chris-belcher","html_url":"https://github.com/chris-belcher","followers_url":"https://api.github.com/users/chris-belcher/followers","following_url":"https://api.github.com/users/chris-belcher/following{/other_user}","gists_url":"https://api.github.com/users/chris-belcher/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-belcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-belcher/subscriptions","organizations_url":"https://api.github.com/users/chris-belcher/orgs","repos_url":"https://api.github.com/users/chris-belcher/repos","events_url":"https://api.github.com/users/chris-belcher/events{/privacy}","received_events_url":"https://api.github.com/users/chris-belcher/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T16:46:30Z","updated_at":"2015-11-06T16:46:30Z","body":"In this plan, would the taker be paying for extra fees if a maker sends lots of small UTXOs that increase the ?\r\n\r\nIt's probably worth doing it anyway because a transaction taking too long to confirm is more annoying than paying more in fees. But there might be an attack where a maker sends lots of dust knowing that somebody else will pay for it to be combined into a large UTXO. So maybe have a sane default ceiling on the amount a taker will pay, rotating to another maker if the required fee is too high.\r\n\r\nFor estimatefee I would structure it that a new abstract method is added to BlockchainInterface which for Bitcoin Core can call estimatefee, for blockr calls some other website, for an eventual ElectrumBlockchainInterface it can call the electrum function."}}