Research/Bitcoin Dev Archive / lightning-dev list
Ionization Protocol: Flood Routing
7 messages, Sep 21 to 27, 2015. Started by Mats Jerratsch.
Rusty Russell (3), Mats Jerratsch (2), Pieter Wuille, Anthony Towns
Quoted text (5 lines)
> On Mon, Sep 21, 2015 at 11:46:13AM +0930, Rusty Russell wrote: >> We regularly choose a dozen "beacon" nodes at random (using proximity to >> the SHA of latest block hash or something). Everyone propagates the >> cheapest route to & from those nodes (which is pretty efficient, similar >> to your scheme).
I don't know, using the beacon kind of technique does seem a little bit cumbersome and you really have to think about a lot of possible attacks that might render the whole network unusable, because all beacons are maliciously sabotaging the network..
Quoted text (6 lines)
> If you do know the entire graph, you don't need to give away any > information about who you want to pay prior to sending the transaction. > Knowing the graph is potentially interesting for commercial and academic > reasons beyond wanting privacy. (Knowing the fees others charge helps you > work out what fees you should charge; but just querying your neighbours' > routes is probably sufficient to work that out too)
I initially thought about going with a Node Directory. That is, a central server collecting the routing data that could be sent there by choice. We can work out with signature and if both nodes submit the route towards the other node, whether this is indeed correct. But as this isn't too much data in the first place, I am very much in favour of just using some gossip-protocol. Furthermore, we can also include some byte for a reputation / web-of-trust system. It is completely optional, if you are able to figure out how to route the payment across your nodes you are not forced to use this system, and I don't think it will have severe privacy problems.
Payer and payee can further work out a rendezvous node. The payee will send the encrypted routing data from that node on to himself and the payer can build the rest of the routing from his viewpoint.
Having this data distributed really allows for making payments without leaving too many visible traces on the network.
I would also spread data about how much can be spent and received with this route and fees for receiving and spending. Again, this data can be very vague and does not need to reflect the real world. You can say you support payments up to 10k satoshis, even though the channel has 5BTC in it.
Is there any plan how we handle connections currently? I am thinking about sending the current IP address with this update, such that nodes can connect to each other after one broke down again, and it would further support dynamic IPs as well. Could be possible to extend this to hidden service notation, although this would need some more bytes to store.
The protocol on my side does look like this currently:
General beacon for our node - pubkey [32] - timestamp [4] - IP/connectionDetails [8+...] - signature [70]
Routing information - pubkey_from_us [32] - pubkey_from_you [32] - fee_sending [4] - max_sending [4] - current_reputation [1] - timestamp [4] - signature [70]
These two would be spread as one message. This allows to keep two separate databases, and be able to bootstrap new nodes with this information, while we do not have to store old beacon data. As reputation will be stored for quite some time, we should really save them with separate signatures. (This will make it more difficult / costly to share the complete database with new nodes, and we need to store old data (reputation should be stored for some time) to validate the signatures.
I was calculating with two updates a day, but only 100k nodes. Each node would make a connection to around 10 other nodes, resulting in 114+10*147 = 1.5kB per update. Each node would only use around 3kb/s up/down and would do around 3 signature verifications per second in idle mode, while allowing everyone a full copy of the routing. Making sure messages spread efficiently is another problem, as we have so many tiny messages. Storing the hashes you received in a bloom table and asking other peers if they want to receive it as well does work, but just the hashes of all messages do add up already..
In the end, the nodes themselves don't really need the routing information, we just need a way to transport the information to the clients that make payments. Nodes will just stupidly obey the orders given in the blob of data they'll receive.
This design opens up for some DDoS attacks, as we don't want other nodes to just spam information all day long that would be relayed through the complete network. Furthermore, one attacker can just emulate a complete network that is vouching for him, and he can use those 'nodes' to push spam through the network as well. This does screw a little bit with the reputation system, but I think it would be possible to detect a cluster of nodes that is only connected to the rest of the network through that one attacker (some graph theory I guess). Furthermore, we can check nodes by pinging them randomly, and dropping any reputation if we cannot reach them.
Mats Jerratsch
Mats Jerratsch <matsjj at gmail.com> writes:
Quoted text (10 lines)
>> On Mon, Sep 21, 2015 at 11:46:13AM +0930, Rusty Russell wrote: >>> We regularly choose a dozen "beacon" nodes at random (using proximity to >>> the SHA of latest block hash or something). Everyone propagates the >>> cheapest route to & from those nodes (which is pretty efficient, similar >>> to your scheme). > > I don't know, using the beacon kind of technique does seem a little > bit cumbersome and you really have to think about a lot of possible > attacks that might render the whole network unusable, because all > beacons are maliciously sabotaging the network..
Indeed. Random selection helps, here, but analysis will be interesting.
Quoted text (13 lines)
>> If you do know the entire graph, you don't need to give away any >> information about who you want to pay prior to sending the transaction. >> Knowing the graph is potentially interesting for commercial and academic >> reasons beyond wanting privacy. (Knowing the fees others charge helps you >> work out what fees you should charge; but just querying your neighbours' >> routes is probably sufficient to work that out too) > > I initially thought about going with a Node Directory. That is, a > central server collecting the routing data that could be sent there by > choice. We can work out with signature and if both nodes submit the > route towards the other node, whether this is indeed correct. But as > this isn't too much data in the first place, I am very much in favour > of just using some gossip-protocol.
Short term I'm thinking we'll have an IRC channel (a-la early bitcoin) and everyone will advertise their channels there. This is design for the next, more ambitious phase.
Quoted text (5 lines)
> Furthermore, we can also include > some byte for a reputation / web-of-trust system. It is completely > optional, if you are able to figure out how to route the payment > across your nodes you are not forced to use this system, and I don't > think it will have severe privacy problems.
I think reputation systems will become an overlay, if the basic system proves vulnerable. It's nicer if we don't have to though, as reputation is both hard to encode in normal behaviour, and deeply centralizing.
Quoted text (3 lines)
> Payer and payee can further work out a rendezvous node. The payee will > send the encrypted routing data from that node on to himself and the > payer can build the rest of the routing from his viewpoint.
Yes, like R hash and destination node, you'd send some routes-from-nodes for one or more rendezvous.
The advantage of this system is that it's less revealing, even if you have to ask how to get to those.
Quoted text (8 lines)
> Having this data distributed really allows for making payments without > leaving too many visible traces on the network. > > I would also spread data about how much can be spent and received with > this route and fees for receiving and spending. Again, this data can > be very vague and does not need to reflect the real world. You can say > you support payments up to 10k satoshis, even though the channel has > 5BTC in it.
My basic model for fees is base + percentage. AJ has been thinking harder about exactly how a node would set these...
Quoted text (6 lines)
> Is there any plan how we handle connections currently? I am thinking > about sending the current IP address with this update, such that nodes > can connect to each other after one broke down again, and it would > further support dynamic IPs as well. Could be possible to extend this > to hidden service notation, although this would need some more bytes > to store.
So, I'm assuming the basic network comms is organized along channel lines; you have to communicate to the other end of the channel anyway, so that makes sense.
This doesn't solve "how do I connect to the network" or "how do I start a channel with this particular node", though. For that, I've floated the idea of reusing the bittorrent DHT, which has extensions to allow just this.
Quoted text (7 lines)
> The protocol on my side does look like this currently: > > General beacon for our node > - pubkey [32] > - timestamp [4] > - IP/connectionDetails [8+...] > - signature [70]
Yep, makes sense. Pubkey is usually 33 bytes, BTW.
You can squeze some more bytes out of you want: 1) Signature should be 64 bytes (never DER encode). 2) Pubkey can be hashed bitcoin-address style, and recovered from sig.
Quoted text (8 lines)
> Routing information > - pubkey_from_us [32] > - pubkey_from_you [32] > - fee_sending [4] > - max_sending [4] > - current_reputation [1] > - timestamp [4] > - signature [70]
If we're using protobufs, they're extensible, so you can add reputation later if we need it.
You also want two signatures, I think: one from each side. Though it makes sense to have a separate teardown message which only needs one sig.
Quoted text (9 lines)
> These two would be spread as one message. > This allows to keep two separate databases, and be able to bootstrap > new nodes with this information, while we do not have to store old > beacon data. > As reputation will be stored for quite some time, we should really > save them with separate signatures. (This will make it more difficult > / costly to share the complete database with new nodes, and we need to > store old data (reputation should be stored for some time) to validate > the signatures.
Unclear what reputation means, here?
Quoted text (14 lines)
> I was calculating with two updates a day, but only 100k nodes. Each > node would make a connection to around 10 other nodes, resulting in > 114+10*147 = 1.5kB per update. Each node would only use around 3kb/s > up/down and would do around 3 signature verifications per second in > idle mode, while allowing everyone a full copy of the routing. Making > sure messages spread efficiently is another problem, as we have so > many tiny messages. Storing the hashes you received in a bloom table > and asking other peers if they want to receive it as well does work, > but just the hashes of all messages do add up already.. > > In the end, the nodes themselves don't really need the routing > information, we just need a way to transport the information to the > clients that make payments. Nodes will just stupidly obey the orders > given in the blob of data they'll receive.
BTW I've not been separating nodes and clients in my head-design. Of course, some nodes might not ever generate payments, and some nodes might never route others' payments, but it increases privacy vastly if they *can*, so I'm trying to think about them that way.
Quoted text (10 lines)
> This design opens up for some DDoS attacks, as we don't want other > nodes to just spam information all day long that would be relayed > through the complete network. Furthermore, one attacker can just > emulate a complete network that is vouching for him, and he can use > those 'nodes' to push spam through the network as well. This does > screw a little bit with the reputation system, but I think it would be > possible to detect a cluster of nodes that is only connected to the > rest of the network through that one attacker (some graph theory I > guess). Furthermore, we can check nodes by pinging them randomly, and > dropping any reputation if we cannot reach them.
Yes, reputation is hard.
What do you think about the idea of using the anchor transactions in the blockchain as a map of the network? You could use an OP_RETURN to stash two pubkeysx, that is the two node IDs.
Cheers, Rusty.
Quoted text (1 line)
> Indeed. Random selection helps, here, but analysis will be interesting.
How have you ended up with a number of beacons you need? 12 seems so low, I can’t imagine so few nodes to support all transacting for even 10 minutes.. And it’s very difficult to estimate how much bitcoin they might need for that timeframe, as some people might want to transact only few satoshi, while others send multiple bitcoin. We can abstract the network towards two nodes at each end and N beacon nodes in the middle doing all the transacting. The two nodes at either side are separate networks then, which need to figure out their own routing.
Furthermore, I don’t really see the big advantage in this scheme. We still need to find a route towards these beacons, and often one might not be interested in the cheapest one, but would want to add more privacy. I think propagating the node-map is pretty efficient in general…
Quoted text (3 lines)
> Short term I'm thinking we'll have an IRC channel (a-la early bitcoin) > and everyone will advertise their channels there. This is design for > the next, more ambitious phase.
Hm I think this would be a wasted effort. While there are probably good libraries to do the job out there, it would still need some implementation. As soon as we can solve the node discovery (and if we want to go with a central server, we might just as well hard-code some reliable nodes into the code for now), we can communicate over the network..
Quoted text (10 lines)
> >> Furthermore, we can also include >> some byte for a reputation / web-of-trust system. It is completely >> optional, if you are able to figure out how to route the payment >> across your nodes you are not forced to use this system, and I don't >> think it will have severe privacy problems. > > I think reputation systems will become an overlay, if the basic system > proves vulnerable. It's nicer if we don't have to though, as reputation > is both hard to encode in normal behaviour, and deeply centralizing.
Yea centralisation is an issue with reputation, we might want to have it rather limited. Have it some way, such that there isn’t much difference between a big node that has been around for long and a relatively new node, as long as both are (1) low latency (2) highly available (3) honest.
Quoted text (15 lines)
>> Is there any plan how we handle connections currently? I am thinking >> about sending the current IP address with this update, such that nodes >> can connect to each other after one broke down again, and it would >> further support dynamic IPs as well. Could be possible to extend this >> to hidden service notation, although this would need some more bytes >> to store. > > So, I'm assuming the basic network comms is organized along channel > lines; you have to communicate to the other end of the channel anyway, > so that makes sense. > > This doesn't solve "how do I connect to the network" or "how do I start > a channel with this particular node", though. For that, I've floated > the idea of reusing the bittorrent DHT, which has extensions to allow > just this.
Yea exactly, we can squeeze these information in there. The packages are very small. If we end up in a situation where they impede the payment transactions, we might want to have some priority mechanism..
The ‘how to connect to the network’ can be solved with basic peer discovery schemes, like IRC or stable-nodes. Having received the topology of the mesh, you can decide which nodes you want to create a channel with (maybe we should add a flag somewhere, whether this node wants to open a channel with strangers and under which conditions). He can directly connect to that node and open a channel with him, or am I missing something?
Quoted text (3 lines)
> You can squeze some more bytes out of you want: > 1) Signature should be 64 bytes (never DER encode). > 2) Pubkey can be hashed bitcoin-address style, and recovered from sig.
You can recover the pubkey from the hash and the sig? Why are we putting the pubkey in the scriptSig then? ;)
Quoted text (6 lines)
> If we're using protobufs, they're extensible, so you can add reputation > later if we need it. > > You also want two signatures, I think: one from each side. Though it > makes sense to have a separate teardown message which only needs one > sig.
Yea was thinking about this as well, I thought as both nodes will propagate their own message, other nodes can puzzle it out, whether the channel has been confirmed by both parties. It saves one signature too..
Quoted text (13 lines)
> >> These two would be spread as one message. >> This allows to keep two separate databases, and be able to bootstrap >> new nodes with this information, while we do not have to store old >> beacon data. > >> As reputation will be stored for quite some time, we should really >> save them with separate signatures. (This will make it more difficult >> / costly to share the complete database with new nodes, and we need to >> store old data (reputation should be stored for some time) to validate >> the signatures. > > Unclear what reputation means, here?
I was thinking about storing reputation for some time for all nodes. I’m not sure this is a good idea anymore, as it may lead to some amount of centralization.. It would be beneficial in this case to have the reputation data along with the signature only, to be efficient. That way you can always recover the reputation data of all nodes of the network for a new node, as you can send along all signatures..
Quoted text (4 lines)
> BTW I've not been separating nodes and clients in my head-design. Of > course, some nodes might not ever generate payments, and some nodes > might never route others' payments, but it increases privacy vastly if > they *can*, so I'm trying to think about them that way.
For me it is more a connection issue. Nodes should have a 99+% uptime and allow for direct incoming connections. Still have to figure it out, but of course as a node provider you can always issue a payment directly (I think for any outsider, there is no difference between the node issuing the payment or some client connected to that node)
Quoted text (5 lines)
> Yes, reputation is hard. > > What do you think about the idea of using the anchor transactions in the > blockchain as a map of the network? You could use an OP_RETURN to stash > two pubkeysx, that is the two node IDs.
Hm isn’t this difficult to prove? Anyone could have put those pubkeys in there, so unless we further put a signature in there, this information holds little value I think.. I like the idea in general, as it would make fake-nodes more difficult, but I think it is difficult to implement in the bitcoin blockchain. Furthermore, how do you plan to have the scriptPubKey for the anchor tx then? Ultimately it is still P2SH, so no one is really able to recover any data from it..
As a plus, I am currently working on some simulation project for lightning. A lot of the metrics are very difficult to estimate (let alone calculate), and often we want to depend on random selection. We will be able to deduct a lot of properties from it, and be able to determine, whether we need something like the reputation system at all, and how many dishonest nodes it takes for some attacks, and how efficient routing is, all the good stuff...
Cheers, Mats
PS.: This was the last time I opened a new thread incidentally -.- Just disabled the digest option… ;) Sorry for the inconvenience...
[ Pieter Wuille Cc'd for pubkey recovery, search for "recovered" ]
Mats Jerratsch <matsjj at gmail.com> writes:
Quoted text (4 lines)
>> Indeed. Random selection helps, here, but analysis will be interesting. > How have you ended up with a number of beacons you need? 12 seems so > low, I can’t imagine so few nodes to support all transacting for even > 10 minutes..
As we keep the last 100 sets of beacons, the load is spread a little. And remember that the network rebalances; too many transfers in one direction and it becomes cheaper to send funds in the other direction. It's unclear how bad it will be.
Quoted text (3 lines)
> And it’s very difficult to estimate how much bitcoin they > might need for that timeframe, as some people might want to transact > only few satoshi, while others send multiple bitcoin.
True. I assume if we build it they will come. But what will the come with?
Quoted text (4 lines)
> We can abstract > the network towards two nodes at each end and N beacon nodes in the > middle doing all the transacting. The two nodes at either side are > separate networks then, which need to figure out their own routing.
Indeed, but it's efficient.
Quoted text (5 lines)
> Furthermore, I don’t really see the big advantage in this scheme. We > still need to find a route towards these beacons, and often one might > not be interested in the cheapest one, but would want to add more > privacy. I think propagating the node-map is pretty efficient in > general…
It's not the node map (which is pretty static; we've even discussed making the on-chain anchor transactions be the map), it's the continuous fee updates.
Quoted text (5 lines)
>> Short term I'm thinking we'll have an IRC channel (a-la early bitcoin) >> and everyone will advertise their channels there. This is design for >> the next, more ambitious phase. > > Hm I think this would be a wasted effort. While there are probably good libraries to do the job out there, it would still need some implementation. As soon as we can solve the node discovery (and if we want to go with a central server, we might just as well hard-code some reliable nodes into the code for now), we can communicate over the network..
As you note below, we can use IRC for the node discovery too. If we just have an IRC channel where you send all your routes, we get both.
That lets us design something real, while we work on getting the rest stable.
Quoted text (14 lines)
>>> Furthermore, we can also include >>> some byte for a reputation / web-of-trust system. It is completely >>> optional, if you are able to figure out how to route the payment >>> across your nodes you are not forced to use this system, and I don't >>> think it will have severe privacy problems. >> >> I think reputation systems will become an overlay, if the basic system >> proves vulnerable. It's nicer if we don't have to though, as reputation >> is both hard to encode in normal behaviour, and deeply centralizing. > > Yea centralisation is an issue with reputation, we might want to have it rather limited. Have it some way, such that there isn’t much difference between a big node that has been around for long and a relatively new node, as long as both are > (1) low latency > (2) highly available > (3) honest.
(1) can be measured, (2) can be intuited over time, but I have no idea how to measure (3) :(
Quoted text (19 lines)
>>> Is there any plan how we handle connections currently? I am thinking >>> about sending the current IP address with this update, such that nodes >>> can connect to each other after one broke down again, and it would >>> further support dynamic IPs as well. Could be possible to extend this >>> to hidden service notation, although this would need some more bytes >>> to store. >> >> So, I'm assuming the basic network comms is organized along channel >> lines; you have to communicate to the other end of the channel anyway, >> so that makes sense. >> >> This doesn't solve "how do I connect to the network" or "how do I start >> a channel with this particular node", though. For that, I've floated >> the idea of reusing the bittorrent DHT, which has extensions to allow >> just this. > > Yea exactly, we can squeeze these information in there. The packages > are very small. If we end up in a situation where they impede the > payment transactions, we might want to have some priority mechanism..
Yes, and it's proven and robust in practice. It's also possible that by adding nodes to the BT DHT we help robustness for everyone.
Quoted text (7 lines)
> The ‘how to connect to the network’ can be solved with basic peer > discovery schemes, like IRC or stable-nodes. Having received the > topology of the mesh, you can decide which nodes you want to create a > channel with (maybe we should add a flag somewhere, whether this node > wants to open a channel with strangers and under which conditions). He > can directly connect to that node and open a channel with him, or am I > missing something?
To start, I was thinking you establish channels with 5 random nodes. Later, we'll probably want something more sophisticated, like 2 nearby nodes (low ping time), and 3 random nodes. Close nodes make sense because payments also cluster along geographic lines. Random nodes make sense for network robustness. Over time, you might open a channel to a node you end up using regularly; there's heaps of fun heuritics to be developed here!
I assumed that advertising an address would be optional; so if you don't want incoming connections, don't advertise.
Quoted text (5 lines)
>> You can squeze some more bytes out of you want: >> 1) Signature should be 64 bytes (never DER encode). >> 2) Pubkey can be hashed bitcoin-address style, and recovered from sig. > > You can recover the pubkey from the hash and the sig? Why are we putting the pubkey in the scriptSig then? ;)
Because crypto is hard :(
TBH I only learned a few months ago that you can do this.
It helps if you have the (two-bit) recovery id, but you can brute force it AFAICT. You then check if the pubkey matches the hash you're given.
Quoted text (8 lines)
>> If we're using protobufs, they're extensible, so you can add reputation >> later if we need it. >> >> You also want two signatures, I think: one from each side. Though it >> makes sense to have a separate teardown message which only needs one >> sig. > > Yea was thinking about this as well, I thought as both nodes will propagate their own message, other nodes can puzzle it out, whether the channel has been confirmed by both parties. It saves one signature too..
Or, in other words, they propagate almost twice as much data :)
Quoted text (9 lines)
>> Unclear what reputation means, here? > > I was thinking about storing reputation for some time for all > nodes. I’m not sure this is a good idea anymore, as it may lead to > some amount of centralization.. It would be beneficial in this case to > have the reputation data along with the signature only, to be > efficient. That way you can always recover the reputation data of all > nodes of the network for a new node, as you can send along all > signatures..
You need to flesh out how reputation is built and destroyed. Does someone with sufficient reputation complain about someone else?
Every time I tried to build a reputation system my head hurt :(
Quoted text (10 lines)
>> BTW I've not been separating nodes and clients in my head-design. Of >> course, some nodes might not ever generate payments, and some nodes >> might never route others' payments, but it increases privacy vastly if >> they *can*, so I'm trying to think about them that way. > > For me it is more a connection issue. Nodes should have a 99+% uptime > and allow for direct incoming connections. Still have to figure it > out, but of course as a node provider you can always issue a payment > directly (I think for any outsider, there is no difference between the > node issuing the payment or some client connected to that node)
Yes, and eventually we end up bridging to other networks, so you really can't tell.
A weird property is that it's only mildly bad to be unreachable (stuff just bounced back for re-routing), as long as you don't go unreachable with HTLCs outstanding. The latter will cause people to drop channels to you.
Quoted text (7 lines)
>> What do you think about the idea of using the anchor transactions in the >> blockchain as a map of the network? You could use an OP_RETURN to stash >> two pubkeysx, that is the two node IDs. > > Hm isn’t this difficult to prove? Anyone could have put those pubkeys > in there, so unless we further put a signature in there, this > information holds little value I think..
Yeah, good point! We can't fit key+sig in 80 bytes, either. Need to do something less dumb if we go that route...
Quoted text (3 lines)
> I like the idea in general, > as it would make fake-nodes more difficult, but I think it is > difficult to implement in the bitcoin blockchain.
I think I'm uncomfortable because I've tried to err on the side of releasing as little info as possible.
Quoted text (4 lines)
> Furthermore, how do > you plan to have the scriptPubKey for the anchor tx then? Ultimately > it is still P2SH, so no one is really able to recover any data from > it..
We could actually make this one non-P2SH, since multisig is standard. That would imply that the address there is the node id.
Quoted text (7 lines)
> As a plus, I am currently working on some simulation project for > lightning. A lot of the metrics are very difficult to estimate (let > alone calculate), and often we want to depend on random selection. We > will be able to deduct a lot of properties from it, and be able to > determine, whether we need something like the reputation system at > all, and how many dishonest nodes it takes for some attacks, and how > efficient routing is, all the good stuff...
Great! BTW my mental goalpost is 1M nodes. More than that is still interesting, but probably only realistic once we have more/real data.
Quoted text (4 lines)
> Cheers, > Mats > > PS.: This was the last time I opened a new thread incidentally -.- Just disabled the digest option… ;) Sorry for the inconvenience...
Heh, that's fine. You get a free pass when you've got such information-dense mails :)
Thanks! Rusty.
On Sep 25, 2015 3:09 AM, "Rusty Russell" wrote:
Quoted text (13 lines)
> >> You can squeze some more bytes out of you want: > >> 1) Signature should be 64 bytes (never DER encode). > >> 2) Pubkey can be hashed bitcoin-address style, and recovered from sig. > > > > You can recover the pubkey from the hash and the sig? Why are we putting the pubkey in the scriptSig then? ;) > > Because crypto is hard :( > > TBH I only learned a few months ago that you can do this. > > It helps if you have the (two-bit) recovery id, but you can brute force > it AFAICT. You then check if the pubkey matches the hash you're given.
You can indeed do public key recovery om ECDSA, and you can brute force the recovery id. In all non-pathological cases, the recovery id will be 0 or 1; only one in about 2^128 randomly generated signatures need 2 or 3.
I don't have much context here, but is there a need for this to be ECDSA? If not, the EC-Schnorr scheme in libsecp256k1 produces 64-byte non-malleable signatures that support pubkey recovery without an additional recovery id, and are compatible with the same private/public keys. The scheme is certainly non-standard and experimental at this point, but it's an instance of a well researched mechanism.
On Fri, Sep 25, 2015 at 09:56:02AM +0930, Rusty Russell wrote:
Quoted text (7 lines)
> [ Pieter Wuille Cc'd for pubkey recovery, search for "recovered" ] > Mats Jerratsch <matsjj at gmail.com> writes: > >> Indeed. Random selection helps, here, but analysis will be interesting. > > How have you ended up with a number of beacons you need? 12 seems so > > low, I can’t imagine so few nodes to support all transacting for even > > 10 minutes.. > As we keep the last 100 sets of beacons, the load is spread a little.
Does that actually work? Old beacons don't do any good if the payee doesn't use them when advertising a route; but old beacons also don't get their fee updates propogated, and aren't known by people who only just joined the network. I don't think you could usefully keep more than the last 2 or 3 sets of beacons?
Quoted text (1 line)
> To start, I was thinking you establish channels with 5 random nodes.
I think Barabasi-Albert graphs are probably pretty reasonable here -- you start by establishing channels to N nodes, selected randomly but favouring nodes in proportion to how connected they already are.
https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model
Cheers, aj
Anthony Towns <aj at erisian.com.au> writes:
Quoted text (14 lines)
> On Fri, Sep 25, 2015 at 09:56:02AM +0930, Rusty Russell wrote: >> [ Pieter Wuille Cc'd for pubkey recovery, search for "recovered" ] >> Mats Jerratsch <matsjj at gmail.com> writes: >> >> Indeed. Random selection helps, here, but analysis will be interesting. >> > How have you ended up with a number of beacons you need? 12 seems so >> > low, I can’t imagine so few nodes to support all transacting for even >> > 10 minutes.. >> As we keep the last 100 sets of beacons, the load is spread a little. > > Does that actually work? Old beacons don't do any good if the payee > doesn't use them when advertising a route; but old beacons also don't > get their fee updates propogated, and aren't known by people who only > just joined the network. I don't think you could usefully keep more than > the last 2 or 3 sets of beacons?
I was thinking they all count as active. No point turning over all the beacons every block.
Quoted text (7 lines)
>> To start, I was thinking you establish channels with 5 random nodes. > > I think Barabasi-Albert graphs are probably pretty reasonable here -- > you start by establishing channels to N nodes, selected randomly but > favouring nodes in proportion to how connected they already are. > > https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model
Interesting. If we assume growth only (as I suggested) we end up with a geometric distribution (as backed by Section 5 of http://www.e-publications.org/ims/submission/index.php/BEJ/user/submissionFile/10315?confirm=c40442a0 ).
It's not clear to me (without reading the paper) how much attachment bias is required for a power law to apply, however. Larger nodes may be incentivized (through profit) to have better uptime, leading to a slight attachment bias. Definitely second order.
It's not clear that we want a power law: do we?
Cheers, Rusty.