As we know, the tip selection procedure is not enforceable, or at least not easily enforceable (we could still do some statistical analysis to know what a node is really doing; I recall some work in this direction done by @darcy.camargo et al.). It is therefore useful to consider various types of tip selection algorithms; after all, it is likely that in the real-world system several of them will be in use (due to the inherent freedom of choosing one).
In this note we aim to describe a tip selection rule which is a reasonable modification of URTS (= Uniformly Random Tip Selection) algorithm considered in the original whitepaper.
Consider a specific node j. For any transaction v, let us denote by
- t(v) the objective (signed) timestamp of the transaction;
- r_j(v) the time of solidification of the transaction for this node (i.e., the time when a transaction and all of its history is received by the node j).
Also, for two transactions u,v where v approves u, we introduce the sibling number s_j(v,u)\in \mathbb{N} (again, with respect to the node j) in the following way. If v_0,\ldots ,v_k approved u directly and the node j heard them in that consecutive order, then s_j(v_i,u)=i.
Fix positive constants C_1,C'_1,C_2 (which are not very large) and M (which is large). Suppose that the node j thinks that v is a tip, and v approves v_1 and v_2. Then, we define the weight w_j(v) of the transaction v for the node j in the following way:
- if t(v)\notin [r_j(v)-C_1,r_j(v)+C'_1] (i.e., the transaction’s timestamp is either too much to the past or too much to the future), then set w_j(v)=0;
- if \max_{i=1,2} (r_j(v)-t(v_i))>M , then set w_j(v)=0 (this is for the “below max depth”).
Otherwise (if the weight w_j(v) was not set to 0 according to the above rules) define
to be the number of “nonlazy approvals” that v did. Then, it would be natural for the $j$th node
to set w_j(v):= k_j(v), and then, for the tip selection, chose v with probability proportional to w_j(v).
It is not totally clear, though, how close the above method is to a Nash equilibrium, and how resilient is it against some other types of misbehavior (for example, deliberate attachments to not-so-old not-tips).
In view of this we may consider further modifications of this method.
Let~f:\mathbb{N}\to[0,1] be some nonincreasing function with f(1)=1 (for example, f(m)=\alpha^{m-1} for some \alpha\in (0,1]).
Then, set
Again, we then just chose v with probability proportional to w_j(v) for tip selection.
To explain why should this be more “Nash-equilibrish”, recall the main idea of the “Equilibria in the Tangle” paper: if some “greedy” actors start favoring a smaller subset of tips, they would create a “competition” there, and be penalized if the weights are defined as in (1). It should also be more resilient against the aforementioned attack (when you are attaching to non-tips, you sibling
number increases).