A Merkle inclusion proof is a proof {that a} transaction is included in a block with a specific hash, nothing extra. Whoever gave you that proof can lie by omission (claiming no transactions you requested for exist within the given block), but when a proof is given, it may be validated.
As I imagine you notice, the proof solely covers the inclusion of a transaction in a given block. It does not show something about that block itself. You need to independently purchase details about that block and confirm it’s a part of the at the moment greatest lively chain. In the event you simply ask some node what their greatest chain is, they will declare no matter, and also you’re trusting that node completely. That’s nonetheless not the way you’re supposed to make use of such inclusion proofs (except you have got purpose to belief them, e.g. as a result of it is your individual node, or as a result of it is run by a identified entity that you simply’re prepared to depend on).
As a substitute, you (the verifier) would typically run a light-weight community node, which does some a part of the community validation. It will hook up with a number of different nodes, obtain the block headers from these nodes, and validate them (simply their syntactic correctness and proof-of-work). Among the many headers chains you acquired, you’d choose the most-work legitimate one, after which confirm the Merkle proof in opposition to that.
There are nonetheless methods in which you’ll be cheated, but it surely’s not so simple as a single node mendacity to you:
- Since you might be solely validating the headers, it’s attainable that the highest-work headers chain is just not really a legitimate blockchain (e.g., it might comprise unauthorized inflation, theft, or double-spending). Doing so wouldn’t persuade full nodes, however it could actually persuade light-weight nodes. The speculation is that attackers is not going to do this as a result of it’s costly, onerous (wants a majority of the hashrate to maintain up), and hopefully a sufficiently vital a part of the ecosystem wouldn’t settle for their blocks, thus making the price of mining wasted. Nonetheless, this assumption does depend on the presence of sufficient fully-validating nodes within the community to make the assault uneconomical. If you’re involved about this, your individual possibility is operating your individual fully-validating node as an alternative of a light-weight one.
- If all friends you speak to are attackers (or colluding with an attacker), one thing known as an Eclipse assault, and are thus shielded off from the actual greatest chain, attackers can get away with establishing an alternate minority-hashrate chain, and hiding the actual greatest chain from you. Relying on how lengthy they will hold the Eclipse assault, this may increasingly nonetheless be extraordinarily costly.
Word that “majority of nodes” is rarely related on this evaluation. The standards are whether or not you have got not less than one sincere peer, and whether or not a majority of the hashrate is working with the attacker.