# We don't need a random walk at all in a Coordinator controlled network
muXxer2019年7月11日:
@Samuel Rufinatscha [IF]
OK here is my idea for a different tipselect algorithm. This will only work in a pre-coordicide network with a coordinator.
IMHO we don't need a random walk at all in a Coordinator controlled network.
At first a small change in the gossip protocoll to prevent spam.
If a new Transaction arrives at the node, and it is solid (trunk and branch exist), it will be gossiped to the neighbors. Otherwise not. This way invalid spam is not spread all over the network. If a transaction in between arrives later, all the tx that become solid will be gossiped. Idea of Hans AFAIK.

You could also expand this to invalid bundles, for example the value spam bundles, that have value spam, but don't change the ledger state at all. You would gossip the first tx's of the bundle, because they are maybe solid, but as soon as the last Tx of the bundle arrives your node, you know that this is value spam, and so you will not spread it around the network.
Now the idea for the tipselect:
You have a list of tips that reference indirectly, lets say the last 3-milestones. All of these tips must be solid, and you only calculate how much parents would be confirmed if you choose that tip. That would be easy because you only need a list of pointers of the parents, and check the length of this list. If a new milestones comes in, the list has to be recalculated. Now if someone requests gTTA, the first tip you choose if one of the, lets say upper 10% of that list of tips with the most amount of parents that would be confirmed. The second tip is just choosen completly random from that list of tips, it could also be a tip that confirms no other tx. Now you just have to check if the ledger state would still be valid by choosing those two tips.
The first tip would try to be at the top of the tangle, and the second one would catch all abandoned tips.

There is another good thing with this approach IMHO. If I'm a bad actor with a lot of hashing power compared to the rest of the network, I can create a parasite chain, which will get confirmed by the coordinator. All the other Tx that were issued between these milestones will walk my parasite chain and attach somewhere in that chain. But since I don't reference them, but they only reference me... they will be abandoned when my parasite chain gets confirmed by the Coordinator.
With my tipselect idea, the parasite chain will still be there and only reference itself, but if an honest nodes does a tipselect, the first Tip will be at the top of this parasite chain (which will also not be referenced by the parasite chain), and the second tip will confirm something else that is a tip. The next node does the same, and also puts the first tip on top of the parasite chain, but the second tip could be the abandoned tip from the first node with a much higher chance than with random walk. Now the parasite chain looks like a trunk of a tree, and the "honest" transactions reference the trunk and each other, so it looks like a climbing plant on the parasite chain. Now if the coordinator picks an honest tip, both will be confirmed.
But I didn't do any simulations, its just how I think this would work and look like :shrug: