A majority of nodes who listen to each other (mutual agreement).
>How do you know if you really have a majority or someone is faking a lot of identities and/or hiding a lot of real ones from you?
You decide in advance from which nodes you want to have a majority agreement.
It doesn't matter how many are out there only the ones you listen to matter (for you).
However if you choose 1000 nodes and 900 of them are offline then your node will halt because it can not reach a majority. In other words you are forced to listen to reliable nodes if you want to have a reliable node.
Also if you listen to 10 but they are all owned by a single person. He can lie to your node. In other words you are forced to listen to nodes operated by different entities. In reality there are for example companies, universities, maybe states non-profit organizations etc. Anyone who wants to use it has aligned interest to not collude with others especially competing entities like 2 different banks or payment provider.
This leads to a core of nodes who mostly all listen to each other. If you want to know the final state without even running a node this would be it.
You ask as man nodes as possible form that core of nodes.
What the core or nodes made final is final.
Spinning up thousands of nodes dont matter. No one will listen to them.
They can all listen to each-other then you essentially created a fork.
No one cares, you can no affect what is final and you cant fool anyone unless the voluntary listen to your nodes.
>.... hiding a lot of real ones from you?
The node network is p2p with signed messages there is no hiding.
There is relaying ofc so each messages can go the fastest way possible
but due to privet/public key encryption there is no tampering possible.
If a node would block traffic it just goes another way.
If a node "disappears" its considered offline so it is ignored but only if the rest still reaches majority. If too many go offline the network halts until majority can be reached again.
>And if you later find out you had the wrong "majority" what do you do, if the state is final from your perspective?
There can not be a "wrong majority" unless you listen to the wrong network of nodes.
If you intentionally dont listen to the current core of the network you basically choose to listen to another network aka a fork.
Its like if you listen to BCH instead of BTC you are free to do so.
https://xrpl.org/consensus-principles-and-rules.html#how-con...