Replies: 5 comments 3 replies
-
You might want to look into hashcash to make it difficult to create large amounts of nodes near to a location. The more crowded that location is, the harder the hashcash is to crack. This will prevent locations in the network from being too crowded. You might want to upgrade from SHA1, which is known to be vulnerable, to SHA3, which should be futureproof for a long time. You may want to consider allowing smart contracts to specify a proof of work needed to join a smart contract. This will help prevent sybil attacks from targeting specific smart contracts. It would be smart to use this system in regards to voting in a smart contract. I agree with you that it should cost something to create an identity. A proof of work would be helpful in achieving this. Ideally, each proof of work should take no longer than a minute on a raspberry pi 400, which is a good representative of the lower average of personal computers. If this hashcash is too short, then it is meaningless, but if it is too long, it will prevent participation in the network. The difficulty to crack the hash should be proportional to the propensity of the given contract or feature to be abused, and its importance to the network. |
Beta Was this translation helpful? Give feedback.
-
I hope to avoid relying on hashcash / proof-of-work for Locutus because it's wasteful and heavily biased towards those with cheap energy and ample hardware, particularly ASIC miners. Are we currently using SHA1 anywhere? I think we're using Blake2b512, we definitely shouldn't be using SHA-1. |
Beta Was this translation helpful? Give feedback.
-
It may be possible to use webassembly instead of a hash algorithm for proof of work. To join in a crowded area of the network, each peer would send you a custom program compiled to webassembly, you would then send them back the result. The program would be encrypted and obfuscated to prevent you from de compiling the program to get the answer without working for it. The program should be no more than 32 MiB in size and take no longer than a minute to execute, if we use the Raspberry PI 400 running 64 bit raspberry as a benchmark. This is similar to how randomX works in Monero. |
Beta Was this translation helpful? Give feedback.
-
An Idea from BLS land
The nodes close to Z then check
What this does is allow a cryptographically provable derived key that is not known beforehand. The nodes that make up Y may churn, and this operation fails, but no worry, as the node can go again quite quickly. Therefore, a node can try to join, but not in an easily targetted manner. Given a reasonably sized network then targetting a group of nodes covering an address space becomes difficult. The difficulty is quite high, but I have not measured it yet. This certainly prevents attackers creating billions of offline keys to wait and target a group. This offline key generation attack is, I belive the most likely approach to sybil atack, even large networks. Removing that capability is similar to the advances in secure kad via timestamp type identity creation and rotation. I belive the BLS approach to be significantly more secure than s/kad It would be great to hear your thoughts on this one. I am very keen on simplicity here and I understand this sounds a little contrived. So any simplification should be investigated. (p.s. BLS Allows much more, such as threshold groups for signing and encryption, also some protection against quantum attacks if we look at the proposals from the Ethereum folks with hash based derivations.) |
Beta Was this translation helpful? Give feedback.
-
sorry for noise, but
Is worth diving into more. With recent advances in spoofing prevention and with QUIK adding more protection this could be better than we think. I am not sure bad nodes only speaking to their pals is helped or hindered by this as it would not matter which protection was in place in that case? (happy to be proven wrong on this point though) |
Beta Was this translation helpful? Give feedback.
-
Problem
Every node in the Locutus network has a location, a floating-point value between 0.0 and 1.0 representing its position in the small-world network. These are arranged in a ring so positions 0.0 and 1.0 are the same. Each contract also has a location that is deterministically derived from the contract's code and parameters through a hash function.
The network's goal is to ensure that nodes close together are much more likely to be connected than distant nodes, specifically, the probability of two nodes being connected should be proportional to
1/distance
.A Sybil attack is where an attacker creates a large number of identities in a system and uses it to gain a disproportionately large influence which they then use for nefarious purposes.
In Locutus, such an attack might involve trying to control all or most peers close to a specific location. This could then be used to drop or ignore get requests or updates for contract states close to that location.
Solutions
1. Identity Creation Cost
1.1 Gateway assignment
When a node joins through a gateway it must negotiate its location with the gateway first. This could be done by both node and gateway generating a random nonce, hashing it, and sending the hash to the other. After exchanging hashes they exchange their actual nonces which are combined to create a new nonce, and a location is derived from that. This prevents either gateway or the joiner from choosing the location.
1.1.1 Attacks
1.2 IP-derived location
1.2.1 Attacks
2. Location Hopping
2.1 Replication
A contract has multiple copies, each indicated by a contract parameter - the location of each copy will be pseudorandom. A user could query a random subset of the copies to ensure that they receive any updates. If any copy has an old version of the state then the user can update them by reinserting the latest version obtained from a different copy.
2.2 Date hopping
A contract contains a parameter for the current date, which will mean that the contract has a different location every day. If today's contract is found to be missing it can be reinserted using an older copy.
Beta Was this translation helpful? Give feedback.
All reactions