Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
1,765
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. Possible method of compromise in the max block size issue:
  2.  
  3. First, do some sort of normal max block size increase proposal (BIP 100, flex cap, etc.) with pretty not-very-conservative constants that a lot of people would accept, but still reasonable enough that it should hopefully always work.
  4.  
  5. Second, make it so that each full node automatically sets an individual hard max block size (overriding the other one) according to what it can support for the foreseeable future. Like:
  6.  
  7. ---
  8. def get_local_hard_maximums(this_computer, UTXO_SIZE):
  9. # we don't want to spend too much time receiving a block
  10. TARGET_RECV_TIME = 5 seconds
  11. # we don't want to spend too much time uploading a block or the
  12. # network will stop working properly
  13. TARGET_PROPAGATION_TIME = 30 seconds
  14. # this hardware will probably be upgraded eventually
  15. HARDWARE_LIFETIME = 4 years
  16.  
  17. BLOCK_INTERVAL = 10 minutes
  18.  
  19. # do benchmarks to see what this user can support
  20. cpu_sigops_per_s = this_computer.benchmark.get_max_sigops_per_s()
  21. free_space_GB = this_computer.get_free_disk_space()
  22. upload_speed = this_computer.benchmark.get_upload_speed()
  23.  
  24. # ask the user what they will accept
  25. show_user_gui("
  26. How much CPU can Bitcoin use (burst)?
  27. |1% -------------------------100%|
  28. How much disk space can Bitcoin use?
  29. |5GB ------------------------free_space_GB|
  30. How much upload can Bitcoin use (burst)?
  31. |1 Mbit/s ------------------------upload_speed|
  32. ")
  33. cpu_sigops_per_s *= user_cpu_percentage
  34. free_space_GB = user_free_space_GB
  35. upload_speed = user_upload_speed
  36.  
  37. # calculate what this computer can support
  38. max_sigops_per_block = cpu_sigops_per_s * TARGET_RECV_TIME
  39. max_net_utxos_per_block = free_space_GB / UTXO_SIZE
  40. / ((HARDWARE_LIFETIME in minutes)*BLOCK_INTERVAL)
  41. max_block_size = upload_speed * TARGET_PROPAGATION_TIME
  42.  
  43. # round down to specific values so that groups of nodes act together
  44. # and don't get picked off one by one (maybe this should be more fancy)
  45. max_sigops_per_bloc = round down to the nearest multiple of 1000
  46. max_net_utxos_per_block = round down to the nearest multiple of 500
  47. max_block_size = round down to the nearest multiple of 0.5 MB
  48.  
  49. return max_sigops_per_block, max_net_utxos_per_block, max_block_size
  50. ---
  51.  
  52. If the software detects that it's rejecting a very long chain due to local hard maximums:
  53. - If the user chose to have Bitcoin use less than 25% of any resource, Bitcoin should say "Increasing this percentage is required in order to be a full node. (Buttons:) [Do it] [Switch to lightweight mode]"
  54. - If Bitcoin is already using more than 25% of all resources, Bitcoin should say *something* like this (hard to figure out good wording), "If you feel that this is a fairly new and well-equipped computer which should be able to connect to Bitcoin as a first-class citizen, then you should continue on in protest of the miners who are creating too-large blocks and the other participants in the Bitcoin economy who are accepting these blocks. You will probably be unable to transact with many Bitcoin businesses -- you should complain to these businesses. If you have a low-end computer, you should use lightweight mode. [Continue] [Switch to lightweight mode] [Adjust resource usage]"
  55.  
  56. Businesses will want to set their max block size to be the minimum of what their customers can accept instead of only basing things on their capabilities. Maybe this info can be transmitted by the payment protocol, and Bitcoin Core could have some built-in method of processing this polling data reasonably.
  57.  
  58. Then the ordinary Bitcoin *users* will by default automatically act together as a unified economic force, which will be influential. I think that this sort of method alone (probably plus a lot of tweaking) could completely replace any global max block size, but it'd probably always be at least somewhat messy. But I think that it make sense as a "backup" max block size method to sort-of-guarantee decentralization into the future.
  59.  
  60.  
  61.  
  62. theymos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement