This is more of a general "blockchain" question and not specific to Ethereum so if I'm off topic here I would appreciate it if you could direct me to a more relevant stackexchange maybe.

On PoW-based blockchains, participants mine for unique hashes with a specific number of leading zeros etc. (there's probably more to it but it's irrelevant to my question).

But I'm wondering whether a blockchain could ask participants to mine for something else. Think of it as a game, a challenge. Let's say a string of characters (bytes, a file whatever..) "hidden" inside the blockchain. Mining for that string should (as in: that's the challenge) be as hard as mining for these unique hashes.

My questions are the following:

  1. Is it possible?
  2. How/Where would you hide it (think of a "custom"/theoretical blockchain or even the Ethereum if it already allows for something like this)
  3. How would you allow users to mine for it without giving too much away thus making it easy for them to hack their way around the mining?

When it comes to mining for unique hashes there is nothing to hide because you're trying to generate a random sequence of characters that doesn't already "exist" somewhere. But in my hypothesis, the "hash" needs to necessarily pre-exist "somewhere" but the user shouldn't have access to it, only "tools"/hints to mine for it..

Thank you in advance for your help :-)

I'm not a blockchain expert (I am a front-end Js developer) so I'm looking for more "high-level" answers :-)

  • The question is vague enough that the answer is yes. Something close is Proof of Space.
    – Ismael
    Apr 3, 2021 at 17:11

1 Answer 1


Well your question is a little hard to answer.

From what I understood, the consensus mechanism you're talking about requires miners to mathematically solve a "challenge" to find a pre-existent hash stored in the blockchain.

The main issue this would have is that a blockchain is not a central database miners are connected to and each node maintains a copy locally. So (Q1) who is going to make the challenge and (Q2) where would it be residing?

(A1) By theory, this can be done with secure multi-party computation, but the only way to tell if that's really possible and how secure it would be is by specifying the mechanism's internal steps and requirements more precisely (e.g. what's the secret/challenge made of, how can an algorithm solve for it, can it be computed with MPC, etc.), and doing the math.

(A2) Since the current secret has to be solved and used to confirm the current open block, you cannot hide the secret of the current open block inside the blockchain, because a blockchain is a chain of blocks containing ledger/state data that has already been confirmed. A potential solve for this is by computing secret(n) (the secret/challenge of block(n)) beforehand, when block(n-1) is still open, then storing secret(n) in block(n-1), and when block(n-1) is confirmed/mined and block(n) is currently open, miners take secret(n) from the previous block and solve it to confirm block(n). (But again, everything depends on the very deep specifications of the secret/challenge, the mechanism and the computation approach)

The network would also need some kind of existing infrastructure that can support such computations.

Energy wise, I think the algorithm would be inefficient, just like POW, due to the solving-for-something part, and these days, networks are slowly drifting away from this style of consensus.

I hope my viewpoint helps clear your questions.

  • "when block(n-1) is confirmed/mined and block(n) is currently open, miners take secret(n) from the previous block and solve it to confirm block(n). " <- mining already works this way - the "secret" is called the previous block hash
    – user253751
    Oct 11, 2022 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.