{"action":"created","comment":{"url":"https://api.github.com/repos/bitshares/bsips/pulls/comments/209449578","pull_request_review_id":145469020,"id":209449578,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTQ0OTU3OA==","diff_hunk":"@@ -171,9 +180,13 @@ Adding a custom active authority means increased effort for the backend, and wit\n - `install_custom_active_authority`: Normal accounts can only create custom active authoritites with a duration of maximum 1 year, LTM can do any duration. Two options come to mind:\n   - A fixed high fee independent of authorities content\n   - Tied to the duration and complexity of the custom active authority. Transaction fee is then `fee = flat_fee + basic_fee * duration` where `basic_fee` is calculated according to complexity (e.g. size of authority, number of restrictions and etc.). Fee is capped at 1 year for LTM.\n-- `update_custom_active_authority`: Base fee similar to `account_update` plus dynamic one for any duration changes\n+- `update_custom_active_authority`: Base fee similar to `account_update` plus dynamic one for any duration changes, no payback if duration in decreased.\n - `delete_custom_active_authority`: Cheap similar to `limit_order_cancel`\n \n+This logic forces the user to think about the desired duration and enforces to put it rather too short than too long. \n+If a custom active is expired, or considered to be too short, extending it is easily doable. ","path":"bsip-0040.md","position":null,"original_position":53,"commit_id":"e749319cace5ed0d43f8ce4abfcb2c8003a13527","original_commit_id":"a1ce8ab255c3a78232ed2d8c8b78fa3b721a35a3","user":{"login":"abitmore","id":9946777,"node_id":"MDQ6VXNlcjk5NDY3Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/9946777?v=4","gravatar_id":"","url":"https://api.github.com/users/abitmore","html_url":"https://github.com/abitmore","followers_url":"https://api.github.com/users/abitmore/followers","following_url":"https://api.github.com/users/abitmore/following{/other_user}","gists_url":"https://api.github.com/users/abitmore/gists{/gist_id}","starred_url":"https://api.github.com/users/abitmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abitmore/subscriptions","organizations_url":"https://api.github.com/users/abitmore/orgs","repos_url":"https://api.github.com/users/abitmore/repos","events_url":"https://api.github.com/users/abitmore/events{/privacy}","received_events_url":"https://api.github.com/users/abitmore/received_events","type":"User","site_admin":false},"body":"Yes, that's the idea I mentioned above.\r\n\r\nBTW, I made an implementation about creation fee:\r\n\r\n```\r\nbillable fields in a custom authority = \r\n   { time_from, time_to, authority, a list of restrictions }\r\n\r\na restriction = { member, modifier, function, argument }\r\n\r\nstruct fee_parameters_type\r\n{\r\n   uint64_t basic_fee        ;\r\n   uint32_t price_per_k_unit ;\r\n};\r\n\r\ntotal units of a custom authority =\r\n   (time_to - time_from) in seconds * items in authority * total units of restrictions\r\n\r\nunits of a restriction = units of argument\r\n\r\ntotal_fee_required = basic_fee + price_per_k_unit * total_units / 1000;\r\n```\r\n\r\nHere is a table for calculation units of different argument types:\r\n\r\nType | Unit | Description\r\n--- | --- | ---\r\npublic_key_type | 4 | it uses around 32 bytes to store, 4 = 32 / 8\r\nfc::sha256 | 4 | SHA256 hash, used in blind transfers\r\nstring | size() / 8 | length of string in 64-bit blocks, round up\r\nlist of strings | sum(units(string)) | total units of strings in list\r\nother simple types | 1 | account id, timestamp, integer and etc\r\nlist of non-string types | list.size() * units(type) | fixed length\r\nattribute restriction | units(restriction) | calculate recursively\r\n\r\nNote:\r\n* list of non-simple types is not allowed in argument.","created_at":"2018-08-12T09:52:43Z","updated_at":"2018-08-12T09:52:43Z","html_url":"https://github.com/bitshares/bsips/pull/86#discussion_r209449578","pull_request_url":"https://api.github.com/repos/bitshares/bsips/pulls/86","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/comments/209449578"},"html":{"href":"https://github.com/bitshares/bsips/pull/86#discussion_r209449578"},"pull_request":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/86"}},"in_reply_to_id":209058495},"pull_request":{"url":"https://api.github.com/repos/bitshares/bsips/pulls/86","id":203822123,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODIyMTIz","html_url":"https://github.com/bitshares/bsips/pull/86","diff_url":"https://github.com/bitshares/bsips/pull/86.diff","patch_url":"https://github.com/bitshares/bsips/pull/86.patch","issue_url":"https://api.github.com/repos/bitshares/bsips/issues/86","number":86,"state":"open","locked":false,"title":"Custom active permission","user":{"login":"sschiessl-bcp","id":33128181,"node_id":"MDQ6VXNlcjMzMTI4MTgx","avatar_url":"https://avatars1.githubusercontent.com/u/33128181?v=4","gravatar_id":"","url":"https://api.github.com/users/sschiessl-bcp","html_url":"https://github.com/sschiessl-bcp","followers_url":"https://api.github.com/users/sschiessl-bcp/followers","following_url":"https://api.github.com/users/sschiessl-bcp/following{/other_user}","gists_url":"https://api.github.com/users/sschiessl-bcp/gists{/gist_id}","starred_url":"https://api.github.com/users/sschiessl-bcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschiessl-bcp/subscriptions","organizations_url":"https://api.github.com/users/sschiessl-bcp/orgs","repos_url":"https://api.github.com/users/sschiessl-bcp/repos","events_url":"https://api.github.com/users/sschiessl-bcp/events{/privacy}","received_events_url":"https://api.github.com/users/sschiessl-bcp/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-25T12:34:22Z","updated_at":"2018-08-12T09:52:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b404c8697f029dba8910ba77345faed00576e04","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitshares/bsips/pulls/86/commits","review_comments_url":"https://api.github.com/repos/bitshares/bsips/pulls/86/comments","review_comment_url":"https://api.github.com/repos/bitshares/bsips/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitshares/bsips/issues/86/comments","statuses_url":"https://api.github.com/repos/bitshares/bsips/statuses/e749319cace5ed0d43f8ce4abfcb2c8003a13527","head":{"label":"sschiessl-bcp:patch-1","ref":"patch-1","sha":"e749319cace5ed0d43f8ce4abfcb2c8003a13527","user":{"login":"sschiessl-bcp","id":33128181,"node_id":"MDQ6VXNlcjMzMTI4MTgx","avatar_url":"https://avatars1.githubusercontent.com/u/33128181?v=4","gravatar_id":"","url":"https://api.github.com/users/sschiessl-bcp","html_url":"https://github.com/sschiessl-bcp","followers_url":"https://api.github.com/users/sschiessl-bcp/followers","following_url":"https://api.github.com/users/sschiessl-bcp/following{/other_user}","gists_url":"https://api.github.com/users/sschiessl-bcp/gists{/gist_id}","starred_url":"https://api.github.com/users/sschiessl-bcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschiessl-bcp/subscriptions","organizations_url":"https://api.github.com/users/sschiessl-bcp/orgs","repos_url":"https://api.github.com/users/sschiessl-bcp/repos","events_url":"https://api.github.com/users/sschiessl-bcp/events{/privacy}","received_events_url":"https://api.github.com/users/sschiessl-bcp/received_events","type":"User","site_admin":false},"repo":{"id":142281397,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyODEzOTc=","name":"bsips","full_name":"sschiessl-bcp/bsips","owner":{"login":"sschiessl-bcp","id":33128181,"node_id":"MDQ6VXNlcjMzMTI4MTgx","avatar_url":"https://avatars1.githubusercontent.com/u/33128181?v=4","gravatar_id":"","url":"https://api.github.com/users/sschiessl-bcp","html_url":"https://github.com/sschiessl-bcp","followers_url":"https://api.github.com/users/sschiessl-bcp/followers","following_url":"https://api.github.com/users/sschiessl-bcp/following{/other_user}","gists_url":"https://api.github.com/users/sschiessl-bcp/gists{/gist_id}","starred_url":"https://api.github.com/users/sschiessl-bcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschiessl-bcp/subscriptions","organizations_url":"https://api.github.com/users/sschiessl-bcp/orgs","repos_url":"https://api.github.com/users/sschiessl-bcp/repos","events_url":"https://api.github.com/users/sschiessl-bcp/events{/privacy}","received_events_url":"https://api.github.com/users/sschiessl-bcp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sschiessl-bcp/bsips","description":"BitShares Improvement Proposals and Protocols. These technical documents describe the process of updating and improving the BitShares blockchain and technical ecosystem.","fork":true,"url":"https://api.github.com/repos/sschiessl-bcp/bsips","forks_url":"https://api.github.com/repos/sschiessl-bcp/bsips/forks","keys_url":"https://api.github.com/repos/sschiessl-bcp/bsips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sschiessl-bcp/bsips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sschiessl-bcp/bsips/teams","hooks_url":"https://api.github.com/repos/sschiessl-bcp/bsips/hooks","issue_events_url":"https://api.github.com/repos/sschiessl-bcp/bsips/issues/events{/number}","events_url":"https://api.github.com/repos/sschiessl-bcp/bsips/events","assignees_url":"https://api.github.com/repos/sschiessl-bcp/bsips/assignees{/user}","branches_url":"https://api.github.com/repos/sschiessl-bcp/bsips/branches{/branch}","tags_url":"https://api.github.com/repos/sschiessl-bcp/bsips/tags","blobs_url":"https://api.github.com/repos/sschiessl-bcp/bsips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sschiessl-bcp/bsips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sschiessl-bcp/bsips/git/refs{/sha}","trees_url":"https://api.github.com/repos/sschiessl-bcp/bsips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sschiessl-bcp/bsips/statuses/{sha}","languages_url":"https://api.github.com/repos/sschiessl-bcp/bsips/languages","stargazers_url":"https://api.github.com/repos/sschiessl-bcp/bsips/stargazers","contributors_url":"https://api.github.com/repos/sschiessl-bcp/bsips/contributors","subscribers_url":"https://api.github.com/repos/sschiessl-bcp/bsips/subscribers","subscription_url":"https://api.github.com/repos/sschiessl-bcp/bsips/subscription","commits_url":"https://api.github.com/repos/sschiessl-bcp/bsips/commits{/sha}","git_commits_url":"https://api.github.com/repos/sschiessl-bcp/bsips/git/commits{/sha}","comments_url":"https://api.github.com/repos/sschiessl-bcp/bsips/comments{/number}","issue_comment_url":"https://api.github.com/repos/sschiessl-bcp/bsips/issues/comments{/number}","contents_url":"https://api.github.com/repos/sschiessl-bcp/bsips/contents/{+path}","compare_url":"https://api.github.com/repos/sschiessl-bcp/bsips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sschiessl-bcp/bsips/merges","archive_url":"https://api.github.com/repos/sschiessl-bcp/bsips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sschiessl-bcp/bsips/downloads","issues_url":"https://api.github.com/repos/sschiessl-bcp/bsips/issues{/number}","pulls_url":"https://api.github.com/repos/sschiessl-bcp/bsips/pulls{/number}","milestones_url":"https://api.github.com/repos/sschiessl-bcp/bsips/milestones{/number}","notifications_url":"https://api.github.com/repos/sschiessl-bcp/bsips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sschiessl-bcp/bsips/labels{/name}","releases_url":"https://api.github.com/repos/sschiessl-bcp/bsips/releases{/id}","deployments_url":"https://api.github.com/repos/sschiessl-bcp/bsips/deployments","created_at":"2018-07-25T09:55:47Z","updated_at":"2018-07-25T15:37:14Z","pushed_at":"2018-08-10T20:42:02Z","git_url":"git://github.com/sschiessl-bcp/bsips.git","ssh_url":"git@github.com:sschiessl-bcp/bsips.git","clone_url":"https://github.com/sschiessl-bcp/bsips.git","svn_url":"https://github.com/sschiessl-bcp/bsips","homepage":"https://bitshares.org","size":1842,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"bitshares:master","ref":"master","sha":"529977580f00f3305a7362cc63f32d5cff3f46b9","user":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"repo":{"id":48125108,"node_id":"MDEwOlJlcG9zaXRvcnk0ODEyNTEwOA==","name":"bsips","full_name":"bitshares/bsips","owner":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitshares/bsips","description":"BitShares Improvement Proposals and Protocols. These technical documents describe the process of updating and improving the BitShares blockchain and technical ecosystem.","fork":false,"url":"https://api.github.com/repos/bitshares/bsips","forks_url":"https://api.github.com/repos/bitshares/bsips/forks","keys_url":"https://api.github.com/repos/bitshares/bsips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitshares/bsips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitshares/bsips/teams","hooks_url":"https://api.github.com/repos/bitshares/bsips/hooks","issue_events_url":"https://api.github.com/repos/bitshares/bsips/issues/events{/number}","events_url":"https://api.github.com/repos/bitshares/bsips/events","assignees_url":"https://api.github.com/repos/bitshares/bsips/assignees{/user}","branches_url":"https://api.github.com/repos/bitshares/bsips/branches{/branch}","tags_url":"https://api.github.com/repos/bitshares/bsips/tags","blobs_url":"https://api.github.com/repos/bitshares/bsips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitshares/bsips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitshares/bsips/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitshares/bsips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitshares/bsips/statuses/{sha}","languages_url":"https://api.github.com/repos/bitshares/bsips/languages","stargazers_url":"https://api.github.com/repos/bitshares/bsips/stargazers","contributors_url":"https://api.github.com/repos/bitshares/bsips/contributors","subscribers_url":"https://api.github.com/repos/bitshares/bsips/subscribers","subscription_url":"https://api.github.com/repos/bitshares/bsips/subscription","commits_url":"https://api.github.com/repos/bitshares/bsips/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitshares/bsips/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitshares/bsips/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitshares/bsips/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitshares/bsips/contents/{+path}","compare_url":"https://api.github.com/repos/bitshares/bsips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitshares/bsips/merges","archive_url":"https://api.github.com/repos/bitshares/bsips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitshares/bsips/downloads","issues_url":"https://api.github.com/repos/bitshares/bsips/issues{/number}","pulls_url":"https://api.github.com/repos/bitshares/bsips/pulls{/number}","milestones_url":"https://api.github.com/repos/bitshares/bsips/milestones{/number}","notifications_url":"https://api.github.com/repos/bitshares/bsips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitshares/bsips/labels{/name}","releases_url":"https://api.github.com/repos/bitshares/bsips/releases{/id}","deployments_url":"https://api.github.com/repos/bitshares/bsips/deployments","created_at":"2015-12-16T17:33:17Z","updated_at":"2018-08-08T21:11:45Z","pushed_at":"2018-08-10T20:42:04Z","git_url":"git://github.com/bitshares/bsips.git","ssh_url":"git@github.com:bitshares/bsips.git","clone_url":"https://github.com/bitshares/bsips.git","svn_url":"https://github.com/bitshares/bsips","homepage":"https://bitshares.org","size":1630,"stargazers_count":41,"watchers_count":41,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"archived":false,"open_issues_count":42,"license":null,"forks":42,"open_issues":42,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/86"},"html":{"href":"https://github.com/bitshares/bsips/pull/86"},"issue":{"href":"https://api.github.com/repos/bitshares/bsips/issues/86"},"comments":{"href":"https://api.github.com/repos/bitshares/bsips/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitshares/bsips/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/bitshares/bsips/statuses/e749319cace5ed0d43f8ce4abfcb2c8003a13527"}},"author_association":"NONE"}}
{"actor":{"display_login":"abitmore"}}