Hacker News new | ask | show | jobs
by sshine 2051 days ago
1) If every block includes source code for an arbitrary hashing algorithm, do you expect arbitrary nodes to run arbitrary code to synchronise with your block? How do you know if some block provider's hashing algorithm terminates? How does your blockchain become trustless if hashing involves arbitrary code execution?

2) An essential property of hashing algorithm is uniform distribution. Future block hashes depend on past block hashes. In PoW this implies compute difficulty scales dynamically. If a block provider gets to choose their hashing algorithm arbitrarily, they could pick a non-uniform hashing algorithm that is easy for themselves and hard for others. In PoS this often affects who gets picked as the next block provider; having control over the hashing function in either case means you can pick yourself again.

If your claim is to let market forces pick the most trusted hashing algorithms, why not just settle on a fixed-but-extensible list of hashing algorithms that are known to work well today?

Making governance a part of the protocol is all the hype.

But there has to exist a protocol with boundaries.

Otherwise, your blockchain is just the internet.

You can download my block now.

1 comments

1) A node _could_ run arbitrary code, but unless it trusts the code's provenance then it should use a white-list as you mention.

> why not just settle on a fixed-but-extensible list of hashing algorithms that are known to work well today?"

Sure, that's what a whitelist will be, but with one major difference: each node gets to pick its own whitelist, there's no built-in centralization via the "one true source code."

2) Yes, miners will choose hashing algorithms that are easy for themselves and hard for others, but the nodes get to value each block from their own perspective. If they think a miner is using a weird hash function, they can penalize it or just blacklist the function.